/* ================================================= */
/* HexaServices - Modern UI/UX Design System         */
/* ================================================= */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --transition: all 0.25s ease-in-out;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    width: 100%;
}

/* Layout Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Header */
header {
    background: var(--theme-surface, #ffffff);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

/* Cards */
.card {
    background: var(--theme-surface, #ffffff);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
    border-radius: 6px;
}

.btn-success { background-color: var(--success); color: white; }
.btn-warning { background-color: var(--warning); color: white; }
.btn-danger { background-color: var(--danger); color: white; }

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
}

.badge-success, .badge-accepted { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger, .badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-pending { background: #e0f2fe; color: #0369a1; }

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: white;
}

.data-table, table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

.data-table th, .data-table td, th, td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.925rem;
}

.data-table th, th {
    background-color: var(--light);
    font-weight: 600;
    color: var(--gray);
}

.data-table tbody tr:hover, tbody tr:hover {
    background-color: #f8fafc;
}

tr:last-child td {
    border-bottom: none;
}

/* Forms & Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: white;
    color: var(--dark);
    margin-top: 5px;
    margin-bottom: 15px;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

/* Grid System */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Dashboard Layout */
.dashboard-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 70px);
    width: 100%;
}

.dashboard-sidebar {
    background: var(--theme-surface, #ffffff);
    border-right: 1px solid var(--border);
    padding: 30px 20px;
}

.dashboard-sidebar h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
    margin-bottom: 15px;
}

.dashboard-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-sidebar ul li {
    margin-bottom: 5px;
}

.dashboard-sidebar ul li a {
    display: block;
    padding: 10px 14px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
}

.dashboard-sidebar ul li a:hover, 
.dashboard-sidebar ul li a.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.dashboard-content {
    padding: 40px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.stat-card h4 {
    font-size: 0.875rem;
    color: var(--gray);
    font-weight: 500;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.925rem;
    font-weight: 500;
}

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.subtitle {
    color: var(--gray);
    font-size: 1rem;
    margin-top: 4px;
}

/* Auth Pages Style */
.auth-body {
    background: var(--light, #f1f5f9);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-wrapper {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--theme-surface, #ffffff);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
}

/* Footer Style */
.site-footer {
    background: linear-gradient(-45deg, #0f172a, #1e293b, #1e3a8a, #0f172a);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #cbd5e1;
    padding: 60px 20px 20px 20px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h3, .footer-col h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 700;
}

.footer-col h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--primary);
    margin-top: 6px;
    border-radius: 2px;
}

.footer-col p, .footer-col ul li a {
    font-size: 0.95rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: #ffffff;
    transform: translateX(6px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 25px;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

/* ========================================================== */
/* Media Queries for Mobile & Tablet Responsiveness           */
/* ========================================================== */

@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    .dashboard-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }

    .dashboard-content {
        padding: 20px 15px;
    }

    h1 {
        font-size: 1.8rem !important;
    }

    h2 {
        font-size: 1.4rem !important;
    }
}




/* ========================================================== */
/* Universal Responsive Fixes for Desktop, Tablet & Mobile      */
/* ========================================================== */

/* Prevent horizontal overflow on any device */
body, html {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Fluid Images and Media */
img, video, canvas {
    max-width: 100%;
    height: auto;
}

/* Tablet View (Max Width: 992px) */
@media screen and (max-width: 992px) {
    .container {
        padding: 0 20px;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-container {
        grid-template-columns: 220px 1fr;
    }
}

/* Mobile & Small Tablet View (Max Width: 768px) */
@media screen and (max-width: 768px) {
    /* Stack Grids */
    .grid-2, .grid-3, .stats-grid {
        grid-template-columns: 1fr !important;
    }

    /* Dashboard Stack Layout for Mobile */
    .dashboard-container {
        grid-template-columns: 1fr !important;
    }

    .dashboard-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 15px;
    }

    .dashboard-content {
        padding: 20px 15px !important;
    }

    /* Adjust typography for smaller screens */
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.4rem !important; }
    
    /* Hero or Banner Section Mobile Spacing */
    .hero-section, .auth-wrapper {
        padding: 10px;
        width: 100%;
    }
}