/**
 * Main Stylesheet
 * Medical Conference Registration System
 */

/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* ========== Language Switcher ========== */
.language-switcher {
    text-align: right;
    margin-bottom: 20px;
}

.language-switcher .btn-lang {
    border: 1px solid #dee2e6;
    background: white;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #6c757d;
    transition: all 0.3s;
    border-radius: 4px;
    margin-left: 5px;
}

.language-switcher .btn-lang:hover {
    background: #f8f9fa;
    color: #0d6efd;
    border-color: #0d6efd;
}

.language-switcher .btn-lang.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
    font-weight: 600;
}

/* ========== Container ========== */
.main-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.main-container2 {
    max-width: 98%;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-title {
    text-align: center;
    color: #0d6efd;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.page-description {
    text-align: center;
    color: #6c757d;
    margin-bottom: 30px;
}

/* ========== Form Styles ========== */
.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #495057;
}

.form-label .text-danger {
    margin-left: 3px;
}

.form-control,
.form-select {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: #adb5bd;
}

/* ========== Buttons ========== */
.btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #0d6efd;
    color: white;
}

.btn-primary:hover {
    background: #0b5ed7;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.btn-success {
    background: #198754;
    color: white;
}

.btn-success:hover {
    background: #157347;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #bb2d3b;
}

.btn-warning {
    background: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background: #ffca2c;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5c636a;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== Alert Messages ========== */
.alert {
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    display: none;
}

.alert.show {
    display: block;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border-color: #badbcc;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
    border-color: #f5c2c7;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
    border-color: #b6effb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
    border-color: #ffecb5;
}

/* ========== Loading Spinner ========== */
.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.loading.active {
    display: block;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* ========== Links ========== */
.link-box {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.link-box a {
    color: #0d6efd;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.link-box a:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

/* ========== Result Box ========== */
.result-box {
    display: none;
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.result-box.show {
    display: block;
}

.result-box .result-item {
    margin-bottom: 10px;
}

.result-box .result-label {
    font-weight: 600;
    color: #495057;
}

.result-box .result-value {
    color: #212529;
}

/* ========== Admin Panel ========== */
.admin-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: white;
    padding: 20px 30px;
    margin: -40px -40px 30px -40px;
    border-radius: 10px 10px 0 0;
}

.admin-header h1 {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.admin-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.admin-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s;
    font-size: 14px;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255, 255, 255, 0.2);
}

/* ========== Stats Cards ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-left: 4px solid #0d6efd;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card h3 {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .number {
    font-size: 36px;
    font-weight: bold;
    color: #0d6efd;
}

.stat-card.stat-online .number {
    color: #0dcaf0;
}

.stat-card.stat-offline .number {
    color: #198754;
}

.stat-card.stat-approved .number {
    color: #198754;
}

.stat-card.stat-pending .number {
    color: #ffc107;
}

/* ========== Table ========== */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: #f8f9fa;
}

th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: #f8f9fa;
}

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

/* ========== Badges ========== */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-online {
    background-color: #cff4fc;
    color: #055160;
}

.badge-offline {
    background-color: #d1e7dd;
    color: #0f5132;
}

.badge-approved {
    background-color: #d1e7dd;
    color: #0f5132;
}

.badge-pending {
    background-color: #fff3cd;
    color: #664d03;
}

/* ========== Filters ========== */
.filters-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filters-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #495057;
}

/* ========== Modal ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #212529;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    color: #0d6efd;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.pagination .active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.pagination .disabled {
    color: #6c757d;
    cursor: not-allowed;
}

/* ========== Login Page ========== */
.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #0d6efd;
    font-size: 26px;
    margin-bottom: 10px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .main-container {
        margin: 20px;
        padding: 25px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-nav {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .table-container {
        font-size: 13px;
    }
    
    th, td {
        padding: 8px 6px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 22px;
    }
    
    .stat-card .number {
        font-size: 28px;
    }
}
