@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #005585;
    --primary-gradient: linear-gradient(45deg, #005585, #0067a2);
    --bg-light: #f8f9fa;
    --border-color: #e2e8f0;
    /* Darker border for visibility */
    --inner-border: #f1f5f9;
    --text-slate: #64748b;
    --text-dark: #1e293b;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    margin: 0;
    background-color: #f8fafc;
    /* Changed to a lighter grey for better contrast with cards */
    color: var(--text-dark);
    overflow-x: hidden;
}

/* --- Global Layout Wrapper --- */
.main-wrapper {
    margin-top: 70px;
    margin-left: 210px;
    padding: 0 20px 25px;
    transition: 0.3s;
    min-height: 100vh;
}

.content {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 992px) {
    .main-wrapper {
        margin-left: 0;
        margin-top: 70px;
        padding: 10px 15px 30px;
    }
}

/* --- Sidebar System --- */
.sidebar {
    width: 210px;
    height: 100vh;
    background: #fff;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-brand img {
    height: 40px;
    width: auto;
}

.sidebar-brand span {
    font-weight: 800;
    font-size: 18px;
    color: var(--text-dark);
}

.side-nav {
    padding: 10px 12px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    margin-bottom: 5px;
    color: #1e293b;
    /* Changed from grey #64748b to dark black */
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 12px;
    transition: var(--transition);
    gap: 12px;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-item:hover {
    background: #f8fafc;
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary-gradient);
    color: #fff !important;
}

.nav-item.active i {
    color: #fff !important;
}

.sidebar-footer {
    padding: 15px 15px 20px;
}

.identity-card {
    background: linear-gradient(280deg, #ffffff26, #c8ffde8a);
    border: 1px solid #41c55d;
    padding: 15px;
    border-radius: 16px;
    margin-bottom: 12px;
}

.role-tag {
    font-size: 10px;
    font-weight: 800;
    color: #0059ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 2px;
}

.status-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    position: relative;
    animation: pulse-web 2s infinite;
}

@keyframes pulse-web {
    70% {}

    100% {}
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(180deg, #ff174c, #ff416c);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
}

.btn-logout:hover {
    background: #e11d48;
    transform: none;
    color: #fff;
}

/* Sidebar Toggle Desktop Logic */
.sidebar.hide {
    left: -210px !important;
}

.main-wrapper.full {
    margin-left: 0 !important;
}

/* Mobile Sidebar Logic */
@media (max-width: 992px) {
    .sidebar {
        left: -210px;
        top: 0;
        padding-top: 0;
        height: 100vh;
        z-index: 2500;
    }

    .sidebar .mobile-close {
        display: flex !important;
    }

    .sidebar.show {
        left: 0 !important;
    }

    .sidebar-overlay {
        display: none;
    }

    .sidebar-overlay.active {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(15, 23, 42, 0.4);
        z-index: 2400;
        backdrop-filter: blur(3px);
    }
}

/* Hide mobile sidebar logo on Desktop */
@media (min-width: 993px) {
    .mobile-sidebar-header {
        display: none !important;
    }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    z-index: 9999;
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px;
}

/* Profile & Avatar Styles */
.avatar-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.list-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.list-view-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Profile & Avatar Styles */
.avatar-circle {
    border-radius: 50% !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}

.gradient-outline {
    position: relative;
    padding: 3px;
    background: linear-gradient(45deg, var(--primary), #60a5fa, #c084fc);
    border-radius: 50%;
}

.gradient-outline img,
.gradient-outline .initial {
    border: 3px solid #fff;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.filter-bar {
    display: flex;
    gap: 10px;
}

.premium-filter {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #fff;
    font-family: 'Outfit';
    font-size: 13px;
    color: var(--text-slate);
    outline: none;
    cursor: pointer;
    transition: 0.3s;
}

.premium-filter:focus {
    border-color: #0059ff;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit';
    transition: var(--transition);
}

/* --- 2. Universal Premium Table with Visible Grid --- */
.premium-table-container {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    width: 100%;
    overflow: hidden;
    background: #fff;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
}

/* Header Styling */
.premium-table thead th {
    background: #f8fafc;
    text-align: left;
    padding: 18px 20px;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    /* Vertical Header Border */
}

/* Body Styling with Grid Lines */
.premium-table tbody td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-dark);
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    /* Horizontal Border */
    border-right: 1px solid #f1f5f9;
    /* Vertical Border */
}

/* Remove last vertical border for cleaner look */
.premium-table th:last-child,
.premium-table td:last-child {
    border-right: none;
}

.premium-table tbody tr:hover {
    background: #fcfdfe;
}

/* --- 3. Name with Icon Component --- */
.name-with-icon {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #0059ff;
    font-size: 14px;
}

/* --- 4. Status Badges (Pastel Design) --- */
.status-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-badge.active {
    background: #e6fffa;
    color: #38b2ac;
}

/* Published */
.status-badge.design {
    background: #faf5ff;
    color: #9f7aea;
}

/* In Review */
.status-badge.brief {
    background: #fffaf0;
    color: #ed8936;
}

/* Approved */
.status-badge.pending {
    background: #fff5f5;
    color: #f56565;
}

/* Pending */

/* --- 5. Action Cell & Open Button --- */
.action-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.btn-open-item {
    padding: 6px 12px;
    background: #eef2ff;
    color: #0059ff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 11px;
    transition: 0.3s;
}

.btn-open-item:hover {
    background: #0059ff;
    color: #fff;
}

/* --- 6. Priority Component --- */
.priority {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.priority.high {
    color: #f56565;
}

.priority.high .priority-dot {
    background: #f56565;
}

.priority.medium {
    color: #ed8936;
}

.priority.medium .priority-dot {
    background: #ed8936;
}

/* --- 7. MOBILE RESPONSIVENESS (GRID VIEW) --- */
@media (max-width: 992px) {
    .premium-table thead {
        display: none;
    }

    .premium-table tbody {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        /* Force 2 columns */
        gap: 12px;
        padding: 10px;
    }

    .premium-table tr {
        display: block;
        background: #fff;
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 12px;
    }

    .premium-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
        font-size: 12px;
        width: 100%;
    }

    .premium-table td:not(:last-child) {
        border-bottom: 1px dashed var(--inner-border);
    }

    .premium-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-slate);
        text-transform: uppercase;
        font-size: 9px;
    }
}

@media (max-width: 550px) {
    .premium-table tbody {
        grid-template-columns: 1fr;
    }

    /* 1 column on very small phones */
    .list-view-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* --- 8. PREMIUM SAAS LOGIN & SIGNUP --- */
.login-page {
    background: #f0f4f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

/* Common Auth Header */
.auth-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
}

.auth-header .logo-box img {
    height: 40px;
}

.auth-header .auth-nav .btn-header {
    padding: 8px 24px;
    border: 1.5px solid #005585;
    color: #005585;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: 0.3s;
}

.auth-header .auth-nav .btn-header:hover {
    background: #005585;
    color: #fff;
}

.login-wrapper {
    display: flex;
    width: 1050px;
    height: 600px;
    max-width: 95%;
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
}

.login-left {
    flex: 1.2;
    background: linear-gradient(135deg, #005585 0%, #003a5c 100%);
    padding: 40px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Sophisticated SaaS Dashboard Graphic */
.saas-dashboard-mock {
    width: 100%;
    height: 320px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    position: relative;
    margin-bottom: 30px;
    backdrop-filter: blur(5px);
}

.mock-top {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.mock-card {
    flex: 1;
    height: 75px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: 0.3s;
}

.mock-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.mock-stat {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.mock-label {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mock-chart {
    width: 100%;
    height: 140px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 0 15px;
}

.chart-bar {
    width: 32px;
    background: linear-gradient(to top, #00d2ff, #3a7bd5);
    border-radius: 8px 8px 0 0;
    opacity: 0;
    transform-origin: bottom;
    animation: bar-sequential 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes bar-sequential {
    0% {
        height: 0;
        opacity: 0;
        transform: scaleY(0);
    }

    100% {
        height: var(--h);
        opacity: 1;
        transform: scaleY(1);
    }
}

/* Staggered Delays */
.chart-bar:nth-child(1) {
    --h: 45%;
    animation-delay: 0.1s;
}

.chart-bar:nth-child(2) {
    --h: 75%;
    animation-delay: 0.3s;
}

.chart-bar:nth-child(3) {
    --h: 55%;
    animation-delay: 0.5s;
}

.chart-bar:nth-child(4) {
    --h: 90%;
    animation-delay: 0.7s;
}

.chart-bar:nth-child(5) {
    --h: 65%;
    animation-delay: 0.9s;
}

.chart-bar:nth-child(6) {
    --h: 80%;
    animation-delay: 1.1s;
}

.login-branding h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 12px;
}

.login-branding p {
    font-size: 16px;
    opacity: 0.6;
    line-height: 1.6;
}

.login-right {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    overflow: hidden;
}

/* Scroll Hide */
.login-right::-webkit-scrollbar {
    width: 0;
}

.login-form-box h2 {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
}

.subtitle {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 25px;
}

/* --- GOOGLE STYLE FLOATING LABELS + FONTAWESOME --- */
.input-wrapper {
    position: relative;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
    z-index: 10;
    transition: 0.3s;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 50px;
    font-size: 15px;
    font-family: 'Outfit';
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    outline: none;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper label {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    padding: 0 8px;
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
    transition: 0.3s ease;
}

.input-wrapper input:focus+label,
.input-wrapper input:not(:placeholder-shown)+label,
.input-wrapper textarea:focus+label,
.input-wrapper textarea:not(:placeholder-shown)+label,
.input-wrapper select:focus+label,
.input-wrapper select:valid+label,
.input-wrapper input[type="time"]+label,
.input-wrapper input[type="month"]+label {
    top: 0;
    font-size: 11px;
    font-weight: 700;
    color: #005585;
    left: 18px;
}

.input-wrapper input:focus {
    border-color: #005585;
    border-width: 2.5px;
}

.input-wrapper input:focus~.input-icon {
    color: #005585;
}

.password-toggle {
    position: absolute;
    right: 18px;
    color: #94a3b8;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
}

.password-toggle:hover {
    color: #005585;
    transform: scale(1.1);
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #005585 0%, #003a5c 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-login:hover {
    transform: translateY(-4px);
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-login:disabled .spinner {
    display: block;
}

.footer-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #64748b;
}

.footer-link a {
    color: #005585;
    font-weight: 700;
    text-decoration: none;
}

/* Mobile Polish */
@media (max-width: 900px) {
    .login-page {
        background: #f8fafc;
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
        padding: 40px 20px;
    }

    .auth-header {
        padding: 0 20px;
    }

    .login-wrapper {
        background: transparent;
        height: auto;
        box-shadow: none;
        align-items: center;
        justify-content: center;
    }

    .login-left {
        display: none;
    }

    .login-right {
        background: #fff;
        width: 100%;
        border-radius: 20px;
        border: 1.5px solid #e2e8f0;
        padding: 40px 25px;
    }
}

/* --- Staff Management Module Enhancements --- */

/* Role Filters */
.role-filter-btn {
    padding: 8px 18px;
    border-radius: 22px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}

.role-filter-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
}

.role-filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Add padding wrapper to generic cards if needed */
.card-padded {
    padding: 25px !important;
}