* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #fff;
    color: #555;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

.page-wrapper {
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
}

.page-container {
    max-width: 1750px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    margin-bottom: 6rem;
    margin-top: 4rem;
}

.navbar {
    background-color: #060606;
    color: #fff;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1750px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.navbar .brand:hover {
    color: #d50000;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.nav-links a:hover {
    color: #d50000;
    border-bottom-color: #d50000;
    text-decoration: none;
}

.nav-links a.logout-link {
    color: #d50000;
    border-bottom-color: transparent;
}

.nav-links a.logout-link:hover {
    color: #fff;
    border-bottom-color: #d50000;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: #060606;
}

h1 {
    font-size: 2.925rem;
    margin-bottom: 3rem;
    position: relative;
    text-transform: uppercase;
    font-weight: 700;
}

h1::before {
    border-top: 4px solid #d50000;
    content: "";
    display: block;
    left: 0;
    position: absolute;
    right: 0;
    top: -0.5rem;
    width: 1.75em;
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

p {
    margin-bottom: 1rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.3rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-success ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #060606;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05rem;
}

.form-group select,
.form-group input[type="file"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #e2e2e2;
    border: 1px solid #e2e2e2;
    border-radius: 0.3rem;
    font-size: 1rem;
    font-family: 'Kanit', sans-serif;
    color: #555;
}

.form-group select:focus,
.form-group input[type="file"]:focus {
    outline: none;
    border-color: #d50000;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: #d50000;
    color: #fff;
    text-decoration: none;
    border-radius: 1.5rem;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: #bf0000;
    text-decoration: none;
    opacity: 1;
}

.btn-secondary {
    background-color: #060606;
    color: #fff;
}

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

.table-container {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: 0.3rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #dcdcdc;
}

.table th {
    background-color: #060606;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.05rem;
    border-bottom: none;
}

.table th:first-child {
    border-radius: 0.3rem 0 0 0;
}

.table th:last-child {
    border-radius: 0 0.3rem 0 0;
}

.table tbody tr:hover {
    background-color: #f8f8f8;
}

.table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 0.3rem;
}

.table tbody tr:last-child td:last-child {
    border-radius: 0 0 0.3rem 0;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background-color: #d50000;
    color: #fff;
    border-radius: 1.5rem;
    font-size: 0.8125rem;
    border: none;
    cursor: pointer;
    margin: 0 0.25rem 0.25rem 0;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.badge:hover {
    background-color: #bf0000;
}

.text-muted {
    color: #9e9e9e;
    font-style: italic;
}

.pagination {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    padding: 2rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 2.5rem;
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #060606;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    margin-bottom: 0.25rem;
}

.login-tagline {
    font-size: 0.875rem;
    color: #9e9e9e;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    font-weight: 500;
}

.login-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.875rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #060606;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #9e9e9e;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-field {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    background-color: #fafafa;
    border: 1.5px solid #e5e5e5;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-family: 'Kanit', sans-serif;
    color: #060606;
    transition: all 0.2s ease;
}

.input-field::placeholder {
    color: #b0b0b0;
}

.input-field:hover {
    border-color: #d50000;
    background-color: #fff;
}

.input-field:focus {
    outline: none;
    border-color: #d50000;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(213, 0, 0, 0.1);
}

.input-field:focus + .input-icon,
.input-wrap:focus-within .input-icon {
    color: #d50000;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #9e9e9e;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #d50000;
}

.login-btn {
    width: 100%;
    padding: 0.875rem;
    background-color: #d50000;
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.login-btn:hover {
    background-color: #bf0000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(213, 0, 0, 0.25);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.login-footer span {
    font-size: 0.75rem;
    color: #b0b0b0;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-weight: 500;
}

.info-text {
    color: #9e9e9e;
    font-size: 0.9375rem;
    margin-bottom: 2rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #9e9e9e;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.manage-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background-color: #f8f8f8;
    border: 1px solid #dcdcdc;
    border-radius: 0.3rem;
}

.manage-bar span {
    font-weight: 600;
    color: #060606;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-box {
    background: #fff;
    border-radius: 0.3rem;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-box h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 700;
    position: relative;
    padding-top: 1rem;
}

.modal-box h2::before {
    border-top: 4px solid #d50000;
    content: "";
    display: block;
    left: 0;
    position: absolute;
    top: 0;
    width: 3rem;
}

.modal-conferences {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dcdcdc;
    border-radius: 0.3rem;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
}

.modal-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.2rem;
    transition: background-color 0.15s ease;
}

.modal-checkbox-label:hover {
    background-color: #f8f8f8;
}

.modal-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #d50000;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #d50000;
    cursor: pointer;
}

.upload-flow {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 800px;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background-color: #d50000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Kanit', sans-serif;
}

.step-content {
    flex: 1;
}

.step-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.step-desc {
    color: #9e9e9e;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.conference-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.conference-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background-color: #f8f8f8;
    border: 2px solid transparent;
    border-radius: 0.3rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.conference-card:hover {
    background-color: #f0f0f0;
    border-color: #d50000;
}

.conference-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #d50000;
    cursor: pointer;
}

.conference-card .conference-title {
    font-weight: 500;
    color: #060606;
    flex: 1;
}

.conference-card .conference-locale {
    color: #9e9e9e;
    font-size: 0.875rem;
}

.selected-count {
    font-size: 0.875rem;
    color: #9e9e9e;
    font-weight: 500;
    margin-top: 0.5rem;
}

.selected-count.has-selection {
    color: #d50000;
}

.csv-preview {
    background-color: #f8f8f8;
    border: 1px solid #dcdcdc;
    border-radius: 0.3rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.csv-preview-header {
    background-color: #060606;
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-weight: 600;
}

.csv-preview pre {
    padding: 1rem 1.25rem;
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #555;
    line-height: 1.8;
}

.file-dropzone {
    position: relative;
    border: 2px dashed #dcdcdc;
    border-radius: 0.3rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.file-dropzone:hover {
    border-color: #d50000;
    background-color: #fff5f5;
}

.file-dropzone.dragover {
    border-color: #d50000;
    background-color: #fff5f5;
}

.file-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-content {
    pointer-events: none;
}

.dropzone-icon {
    color: #9e9e9e;
    margin-bottom: 1rem;
}

.dropzone-text {
    color: #060606;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.dropzone-hint {
    color: #9e9e9e;
    font-size: 0.875rem;
    margin: 0;
}

.file-name {
    color: #060606;
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

@media only screen and (max-width: 768px) {
    .page-container {
        margin-top: 2rem;
        margin-bottom: 3rem;
    }

    h1 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .login-card {
        padding: 2rem;
    }

    .login-logo {
        font-size: 1.25rem;
    }

    .modal-box {
        padding: 1.5rem;
        max-height: 90vh;
    }
}
