/* Base typography and layout */
body {
    font-family: system-ui, sans-serif;
    margin: 0;
    padding: 40px;
    background-color: #f7f9fc;
    color: #1a1a1a;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

/* Main container */
.box {
    background-color: #ffffff;
    padding: 32px;
    width: 100%;
    max-width: 1440px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

/* Responsive spacing */
@media (max-width: 1440px) {
    .box {
        margin: 0 40px;
    }
}

/* Text paragraphs */
p {
    line-height: 1.5rem;
}

/* Buttons */
button {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #1e4ed8;
}

button:disabled {
    background-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
}

/* Custom File Inputs */
input[type="file"] {
    display: none;
}

.custom-file-label, select {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f1f5f9;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    color: #1e293b;
}

.custom-file-label:hover, select:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
}

/* Editable text input for renaming */
input[type="text"] {
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    background-color: #f9fafb;
    color: #1e293b;
    transition: border-color 0.2s, background-color 0.2s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #fff;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    font-size: 0.95rem;
}

table, th, td {
    border: 1px solid #d1d5db;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #111827;
}

tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Modern checkboxes */
.checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #94a3b8;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s, border-color 0.2s;
}

.checkbox:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}



/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f172a;
        color: #e2e8f0;
    }

    .box {
        background-color: #1e293b;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }

    button {
        background-color: #3b82f6;
        color: #ffffff;
    }

    button:hover {
        background-color: #2563eb;
    }

    button:disabled {
        background-color: #334155;
        color: #94a3b8;
    }

    .custom-file-label, select {
        background-color: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }

    .custom-file-label:hover, select:hover {
        background-color: #475569;
    }

    input[type="text"] {
        background-color: #1e293b;
        color: #e2e8f0;
        border-color: #475569;
    }

    input[type="text"]:focus {
        background-color: #0f172a;
        border-color: #3b82f6;
    }

    table, th, td {
        border-color: #475569;
    }

    th {
        background-color: #1e293b;
        color: #f1f5f9;
    }

    tr:nth-child(even) {
        background-color: #273549;
    }

    .checkbox {
        background-color: #1e293b;
        border-color: #94a3b8;
    }

    .checkbox:checked {
        background-color: #3b82f6;
        border-color: #3b82f6;
    }
}