* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
}

body {
    background: #f0f2f5;
    min-height: 100vh;
    /* font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

}


.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 420px;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #1a73e8;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a73e8;
}

.btn {
    /* width: 100%; */
    padding: 13px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    text-decoration: none;
}

.btn:hover {
    background: #1557b0;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert.error {
    background: #fdecea;
    color: #d93025;
}

.alert.success {
    background: #e6f4ea;
    color: #137333;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.auth-link a {
    color: #1a73e8;
    text-decoration: none;
}

/* ===== Dashboard Layout ===== */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: #0f2a56;
    color: white;
    padding: 20px 0;
    flex-shrink: 0;
}

.sidebar .logo {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    padding: 10px 20px 30px;
    border-bottom: 1px solid #334155;
}

.sidebar nav a {
    display: block;
    padding: 14px 25px;
    color: #cbd5e1;
    text-decoration: none;
    transition: 0.2s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #334155;
    color: white;
}

.sidebar nav a.logout {
    margin-top: 30px;
    color: #f87171;
}

.main-content {
    flex: 1;
    padding: 25px;
    background: #f1f5f9;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.topbar h1 {
    font-size: 24px;
    color: #0f2a56;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    background: #1a73e8;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card h3 {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 10px;
}

.card .number {
    font-size: 28px;
    font-weight: 700;
    color: #0f2a56;
}

.welcome-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Table */
.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
}

.status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status.active { background: #dcfce7; color: #166534; }
.status.inactive { background: #fef9c3; color: #854d0e; }
.status.banned { background: #fee2e2; color: #991b1b; }

.btn-sm {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 5px;
    color: white;
}

.btn-success { background: #16a34a; }
.btn-warning { background: #ca8a04; }
.btn-danger { background: #dc2626; }

.btn-sm:hover { opacity: 0.9; }

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .sidebar nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .sidebar nav a {
        padding: 10px 15px;
    }
}

.form-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-container h3 {
    margin: 25px 0 15px;
    color: #0f2a56;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
}

/* ===== Improved Responsive Navbar ===== */
.navbar {
    background: #0f2a56;
    color: white;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    position: relative;
}

.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 15px;
    transition: 0.2s;
    display: block;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: #334155;
    color: white;
}

.nav-menu li a.logout {
    color: #f87171;
}

.nav-menu li a.logout:hover {
    background: #7f1d1d;
    color: white;
}

.user-badge {
    background: #2563eb;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: 0.3s;
}

/* ===== Mobile Styles ===== */
@media (max-width: 900px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 60px;
        right: 0;
        width: 260px;
        background: #0f2a56;
        flex-direction: column;
        align-items: stretch;
        padding: 15px 0;
        gap: 0;
        border-radius: 0 0 0 12px;
        box-shadow: -5px 10px 25px rgba(0,0,0,0.3);
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        padding: 14px 25px;
        border-radius: 0;
        font-size: 16px;
    }

    .nav-menu li a:hover,
    .nav-menu li a.active {
        background: #334155;
    }

    .user-badge {
        margin: 15px 25px 5px;
        display: inline-block;
    }
}

/* ===== Page Content ===== */
.page-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 26px;
    color: #0f2a56;
    margin: 0;
}

.user-info {
    font-size: 15px;
    color: #475569;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.card h3 {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
    font-weight: 500;
}

.card .number {
    font-size: 28px;
    font-weight: 700;
    color: #0f2a56;
    margin: 0;
}

/* Content Box */
.content-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.content-box h2 {
    margin-bottom: 12px;
    color: #0f2a56;
}

.content-box p {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* ===== Responsive Table Fix ===== */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    overflow-x: auto;          /* Important */
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;          /* Forces horizontal scroll on small screens */
}

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;       /* Prevents text wrapping */
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
}

#imp_input{
    text-transform: uppercase;
}

/* ===== Modal Styles ===== */

.btn-cancel {
    background: #e2e8f0 !important;
    color: #0f2a56 !important;
}

.btn-cancel:hover {
    background: #cbd5e1 !important;
}

/* ===== Responsive Modal Styles ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;

    width: 100%;
    height: 100%;
    height: 100dvh;

    background-color: rgba(0, 0, 0, 0.55);

    justify-content: center;
    align-items: center;

    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal-content {
    position: relative;

    background: #ffffff;
    padding: 30px;

    width: 100%;
    max-width: 400px;

    border-radius: 12px;
    text-align: center;

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);

    margin: auto;
    box-sizing: border-box;

    animation: modalFadeIn 0.25s ease;
}

.modal-content h3 {
    margin: 0 0 12px;
    color: #0878f9;
    font-size: 22px;
}

.modal-content p {
    color: #64748b;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Modal animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Mobile Responsive ===== */
@media (max-width: 600px) {
    .modal {
        padding: 16px;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        padding: 24px 20px;
        border-radius: 12px;
    }

    .modal-content h3 {
        font-size: 20px;
    }

    .modal-content p {
        font-size: 14px;
    }

    .modal-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .modal-actions .btn {
        width: 100%;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }
}



/* ===== Final Mobile Delete Modal Fix ===== */

#deleteModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;

    width: 100%;
    height: 100%;
    height: 100dvh;

    padding: 16px;
    box-sizing: border-box;

    background: rgba(0, 0, 0, 0.55);

    align-items: center;
    justify-content: center;

    overflow-y: auto;
}

#deleteModal .modal-content {
    width: 100%;
    max-width: 400px;

    margin: auto;
    padding: 26px 22px;

    background: #fff;
    border-radius: 12px;
    box-sizing: border-box;

    text-align: center;
}

#deleteModal .modal-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

#deleteModal .modal-actions .btn {
    width: auto;
    min-width: 110px;
    min-height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 11px 18px;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    #deleteModal {
        padding: 16px;
    }

    #deleteModal .modal-content {
        max-width: 360px;
        padding: 24px 20px;
    }

    #deleteModal .modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    #deleteModal .modal-actions .btn {
        width: 100%;
        min-width: 0;
    }
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

