@font-face {
    font-family: 'Torus Pro';
    src: url('demo_fonts/TorusPro-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

:root {
    --primary-color: #FF3333;
    --primary-hover: #FE5A5F;
    --secondary-color: #87B3D4;
    --text-color: #141617;
    --background-color: #FFFFFF;
    --container-bg: #FFFFFF;
    --border-color: #F4F8FB;
    --accent-yellow: #EAC435;
    --light-grey: #F7F7F7;
    --blue: #3498DB;
    --primary-red: #FF3333;
    --light-red: #FE5A5F;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--container-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    margin-top: 20px;
}

.header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    width: auto;
}

.logo-okey {
    height: 100px;
}

.logo-alfred {
    height: 45px;
    margin-left: auto;
}

.container .logo {
    display: none;
}

h1 {
    font-family: 'Torus Pro', sans-serif;
    color: var(--text-color);
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    font-weight: bold;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background-color: var(--container-bg);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-family: 'Torus Pro', sans-serif;
    background-color: var(--border-color);
    color: var(--text-color);
    font-weight: bold;
}

tr:hover {
    background-color: var(--border-color);
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: var(--primary-red);
    color: white;
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
}

.btn-primary:hover {
    background-color: var(--light-red);
}

.btn-secondary {
    background-color: var(--light-grey);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-danger {
    background-color: var(--primary-red);
    color: white;
}

.btn-danger:hover {
    background-color: var(--light-red);
}

/* Button spacing */
form .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

form .btn:last-child {
    margin-right: 0;
}

/* Small button variant */
.btn-small {
    padding: 4px 8px;
    font-size: 12px;
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .btn {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .btn-small {
        font-size: 11px;
        padding: 3px 6px;
    }
}

.nav-buttons {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-family: 'Torus Pro', sans-serif;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background-color: white;
    color: var(--text-color);
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(254, 90, 95, 0.2);
}

.example {
    color: var(--secondary-color);
    font-style: italic;
    margin-top: 8px;
}

/* Progress Bar Styles */
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: var(--light-grey);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background-color: var(--blue);
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-color);
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap;
}

/* Progress bar mobile adjustments */
@media screen and (max-width: 768px) {
    .progress-bar {
        height: 24px;
    }
    
    .progress-text {
        font-size: 0.85em;
    }
}

/* Compact table styles */
.compact-table {
    line-height: 1.2;
    font-size: 0.95em;
}

.compact-table tr {
    border-bottom: 1px solid var(--border-color);
}

.compact-table tr:hover {
    background-color: var(--light-grey);
}

.compact-table td {
    padding: 8px 12px;
    vertical-align: middle;
}

/* Table header styles */
.compact-table th {
    padding: 12px;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.meta-header {
    display: flex;
    gap: 12px;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1em;
    color: var(--text-color);
}

.meta-header span {
    flex: 1;
    white-space: nowrap;
}

/* Column width consistency */
.status-col {
    width: 30px;
    text-align: center;
}

.name-col {
    width: 25%;
}

.value-col {
    width: 45%;
}

.meta-col {
    width: 30%;
}

/* Ensure meta content aligns with header */
.meta-content {
    display: flex;
    gap: 12px;
    align-items: center;
}

.meta-content .category {
    min-width: 80px;
}

.meta-content .type {
    min-width: 60px;
}

/* Status column */
.status-check {
    color: #2ecc71;
    font-weight: bold;
    font-size: 1.1em;
}

/* Name column */
.name-col {
    font-weight: 500;
}

/* Value column */
.value-col {
}

.value-content {
    max-height: 2.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.media-link {
    color: var(--blue);
    text-decoration: none;
    font-size: 0.9em;
}

.media-link:hover {
    text-decoration: underline;
}

/* Meta column */
.meta-content .category,
.meta-content .type {
    color: #888;
    background: var(--light-grey);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Completed row styling */
.completed {
    background-color: var(--light-grey);
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .compact-table td {
        padding: 12px 8px;
    }

    .meta-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .meta-header span {
        display: block;
    }

    .value-content {
        max-height: none;
        -webkit-line-clamp: none;
    }

    td[data-label="Meta"] {
        padding-left: 8px;
    }

    .status-col {
        width: auto;
        text-align: left;
    }

    .header {
        padding: 15px;
    }

    .logo-okey {
        height: 80px;
    }

    .logo-alfred {
        height: 36px;
    }
}

/* Add smooth transitions */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
        margin: 0;
        border-radius: 0;
    }

    h1 {
        font-size: 1.8em;
        margin: 20px 0;
    }

    /* Table responsiveness */
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background-color: white;
    }

    td {
        position: relative;
        padding: 12px 12px 12px 50%;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }

    td:last-child {
        border-bottom: none;
    }

    td:before {
        position: absolute;
        left: 12px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        content: attr(data-label);
        font-family: 'Torus Pro', sans-serif;
        font-weight: bold;
        color: var(--text-color);
    }

    /* Button adjustments */
    .btn {
        display: block;
        width: 100%;
        margin: 8px 0;
        text-align: center;
    }

    .nav-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    /* Form adjustments */
    .form-group {
        margin-bottom: 15px;
    }

    .form-control {
        padding: 10px;
    }

    /* Fix multiple buttons in same cell */
    td .btn {
        margin: 4px 0;
    }
}

/* Small phones */
@media screen and (max-width: 480px) {
    body {
        padding: 5px;
    }

    h1 {
        font-size: 1.5em;
    }

    .container {
        padding: 10px;
    }

    td {
        padding: 10px;
        padding-left: 45%;
    }

    td:before {
        left: 10px;
    }
}

/* Value cell with copy button */
.value-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.value-content {
    flex: 1;
    max-height: 2.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.btn-copy {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-copy:hover {
    background-color: var(--light-grey);
    color: var(--text-color);
}

.btn-copy.copied {
    color: #2ecc71;
    background-color: #eafaf1;
}

.btn-copy svg {
    width: 16px;
    height: 16px;
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .value-wrapper {
        gap: 6px;
    }

    .btn-copy {
        padding: 6px;
    }

    .btn-copy svg {
        width: 14px;
        height: 14px;
    }
}

/* Top actions layout */
.top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.progress-container {
    min-width: 200px;
    max-width: 300px;
}

.export-button {
    margin-bottom: 20px;
}

/* Progress bar styles */
.progress-bar {
    width: 100%;
    height: 24px;
    background-color: var(--light-grey);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background-color: var(--blue);
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-color);
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap;
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .top-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .progress-container {
        min-width: 100%;
    }

    .progress-bar {
        height: 28px;
    }
}
