* {
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

html,
body {
    margin: 0;
    padding: 0;
    /* Changed to pure white to match most logo backgrounds and eliminate the 'patch' effect */
    background-color: #ffffff;
    color: #000;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Helper to prevent auth flicker */
.auth-detected .hide-on-auth {
    display: none !important;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: linear-gradient(90deg, #0f2a44, #1a3c5e);
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    /* Changed from flex-end to space-between */
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Apply same styles to both left and right nav buttons */
.nav-buttons button,
.nav-left button {
    margin-left: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-buttons button:hover,
.nav-left button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Primary "Sign Up" button distinctive style */
.nav-buttons .primary {
    background: linear-gradient(135deg, #FF9933, #FF512F);
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(255, 81, 47, 0.3);
}

.nav-buttons .primary:hover {
    background: linear-gradient(135deg, #FF512F, #DD2476);
    box-shadow: 0 6px 14px rgba(255, 81, 47, 0.4);
    transform: translateY(-2px);
}

/* "Sign In" button */
.nav-buttons .outline {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
}

.nav-buttons .outline:hover {
    background: #fff;
    color: #0f2a44;
}

/* ===== LOGO ===== */
.logo-box {
    text-align: center;
    margin: 10px 0 5px;
    padding: 0 10px;
}

.logo-box img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    /* Ensure no shadow or borders are applied to the image */
    border: none;
    box-shadow: none;
}

/* ===== TITLE ===== */
.title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #0f2a44, #1e90ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

/* ===== TABLES LAYOUT ===== */
.tables {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-bottom: 30px;
}

/* ===== CARDS & TABLES ===== */
.table-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    width: 90%;
    max-width: 1200px;
    border: 1px solid #f0f0f0;
}

/* Override previous widths to match */
.workshop-table,
.booking-table {
    width: 90%;
    max-width: 1200px;
}

/* Headings inside cards */
.table-box h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    color: #000;
    border-left: 4px solid #1e90ff;
    padding-left: 12px;
}

/* ===== TABLE STYLING ===== */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-size: 14px;
}

th {
    padding: 12px;
    color: #000;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-align: center;
    border: none;
    background: #f8f9fa;
    border-radius: 6px;
}

tbody tr {
    background: #fff;
    transition: box-shadow 0.2s, background 0.2s;
    border-bottom: 1px solid #eee;
}

tbody tr:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    z-index: 2;
    position: relative;
    background: #fafbff;
}

td {
    padding: 12px;
    border: none;
    text-align: center;
    color: #000;
    border-bottom: 1px solid #f0f0f0;
}

/* First and last cells rounded styling */
tbody tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    font-weight: 600;
    color: #1e90ff;
    border-left: 1px solid #f0f0f0;
}

tbody tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-right: 1px solid #f0f0f0;
}

/* Links inside tables */
td a {
    color: #1e90ff;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

td a:hover {
    background: rgba(30, 144, 255, 0.1);
    text-decoration: none;
}

/* Small Buttons in Table */
.small {
    padding: 6px 16px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #1e90ff, #0056b3);
    color: #fff;
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    box-shadow: 0 4px 10px rgba(30, 144, 255, 0.2);
    transition: all 0.3s ease;
}

.small:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(30, 144, 255, 0.4);
}

/* ===== RESPONSIVE DESIGN ===== */
/* Tablet & Smaller Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
    .top-bar {
        justify-content: center;
        padding: 10px;
    }

    .workshop-table,
    .booking-table {
        width: 95%;
    }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 10px;
    }

    .nav-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .nav-buttons button {
        margin: 0;
        flex: 1 1 auto;
        min-width: 80px;
        max-width: 48%;
        text-align: center;
        padding: 8px 6px;
    }

    .logo-box {
        margin: 15px 0 10px;
    }

    .logo-box img {
        max-height: 60px;
    }

    .title {
        font-size: 26px;
        margin-bottom: 20px;
    }

    .table-box {
        width: 95%;
        padding: 10px;
        /* Ensure scrolling happens if table is too wide */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 11px;
        /* Remove fixed layout so columns size to content */
        table-layout: auto;
        /* Ensure table is wide enough to not squash text */
        min-width: 600px;
        width: 100%;
    }

    th,
    td {
        padding: 8px 4px;
        /* Slightly more comfortable padding */
        white-space: normal;
        /* Prevent breaking words in middle */
        word-break: keep-all;
        word-wrap: normal;
    }

    /* Optional: Keep sticky first column if needed, or just let users scroll */

    .small {
        padding: 4px 8px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 22px;
    }

    th,
    td {
        padding: 4px 1px;
        font-size: 10px;
    }
}

/* ===== SIGN UP PAGE STYLES ===== */
.signup-page-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 80px 20px 40px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.signup-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

.signup-title {
    text-align: center;
    color: #0f2a44;
    margin: 0 0 10px 0;
    font-size: 28px;
}

.signup-subtitle {
    text-align: center;
    color: #000;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #000;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: #fcfcfc;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #1e90ff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
    outline: none;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #FF9933, #FF512F);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 81, 47, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 81, 47, 0.4);
}

/* Mobile responsive for form */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
}

/* ===== SIGN IN PAGE EXTRAS ===== */
.form-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me {
    font-size: 13px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.forgot-password {
    font-size: 13px;
    color: #1e90ff;
    text-decoration: none;
    font-weight: 500;
}

/* ===== ADMIN DASHBOARD STYLES ===== */
.admin-container {
    display: flex;
    min-height: 100vh;
    background-color: #f0f2f5;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: #0f2a44;
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.sidebar-menu li a {
    display: block;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-left-color: #1e90ff;
}

.sidebar-menu li a.back-home {
    margin-top: 20px;
    border-left-color: transparent;
    color: #ff9933;
}

.sidebar-menu li a.back-home:hover {
    color: #fff;
    background: transparent;
}

/* Main Content */
.admin-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.admin-header {
    background: #fff;
    padding: 15px 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    margin: 0;
    font-size: 22px;
    color: #000;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #000;
}

.user-profile .avatar {
    width: 35px;
    height: 35px;
    background: #1e90ff;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.content-display {
    padding: 30px;
    flex: 1;
}

/* Mobile Responsive Admin */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
    }

    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 5px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar-menu li a {
        padding: 10px 15px;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .sidebar-menu li a:hover,
    .sidebar-menu li.active a {
        border-left: none;
        border-bottom-color: #1e90ff;
    }
}

/* Password Toggle Styles */
.password-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100% !important;
    padding-right: 45px !important;
    /* Make space for eye icon */
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #888;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 30px;
    z-index: 10;
}

.password-toggle:hover {
    color: #1e90ff;
}

/* ===== PROFILE DROPDOWN ===== */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1e90ff;
    color: white;
    border: 2px solid white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    transition: transform 0.2s;
}

.profile-btn:hover {
    transform: scale(1.1);
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 50px;
    background: white;
    min-width: 180px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    overflow: hidden;
    padding: 5px 0;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: #f5f7fa;
    color: #1e90ff;
}

.dropdown-menu a.logout-link {
    color: #ff6b6b;
    border-top: 1px solid #f0f0f0;
}

.dropdown-menu a.logout-link:hover {
    background: #fff5f5;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }

    .nav-left,
    .nav-buttons {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
        align-items: center;
        /* Center buttons */
    }

    .nav-buttons button,
    .nav-left button {
        margin: 0;
        /* Remove side margins */
        width: 100%;
        /* Full width buttons for easy tapping */
        text-align: center;
        margin-bottom: 5px;
    }

    .logo-box img {
        max-height: 60px;
        /* Smaller logo */
    }

    .title {
        font-size: 28px;
        /* Smaller title */
    }

    .table-box {
        overflow-x: auto;
        /* Enable horizontal scrolling for tables */
        padding: 10px;
    }

    th,
    td {
        padding: 10px;
        /* Reduce padding in table cells */
        font-size: 14px;
        white-space: nowrap;
        /* Prevent text wrapping inside cells */
    }
}