/* 
 * CRMC Standalone Frontend App CSS - Fullscreen SaaS Dashboard Pro 6.0
 * Auth Suite (Login/Register/Forgot), Global Modals & Compact Header Spacing
 */

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

/* Force Hide Admin Bar WordPress */
#wpadminbar {
    display: none !important;
}

html, body, body.crmc-standalone-body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    background: #f8fafc !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    color: #0f172a !important;
    font-size: 13.5px;
    -webkit-font-smoothing: antialiased;
}

:root {
    --crmc-bg-dark: #0f172a;
    --crmc-sidebar-dark: #1e293b;
    --crmc-accent-blue: #2563eb;
    --crmc-accent-gold: #d4af37;
    --crmc-text-primary: #0f172a;
    --crmc-text-muted: #475569;
    --crmc-border: #e2e8f0;
    --crmc-card-shadow: 0 4px 18px rgba(0,0,0,0.03);
}

/* Auth Suite Navigation Tabs */
.crmc-fe-auth-nav {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.auth-tab-btn {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab-btn.active {
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Auth Form Panes display logic */
.auth-form-pane {
    display: none !important;
}

.auth-form-pane.active {
    display: block !important;
    animation: fadeIn 0.25s ease-out;
}

/* Fullscreen App Shell Layout */
.crmc-fe-app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Sidebar Navigation Left */
.crmc-fe-sidebar {
    width: 260px;
    background: var(--crmc-sidebar-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.crmc-fe-sidebar-brand {
    padding: 20px 24px 18px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.crmc-fe-sidebar-brand .brand-icon {
    font-size: 26px;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}
.crmc-fe-sidebar-brand .brand-icon img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.crmc-fe-sidebar-brand .brand-title {
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
}

.crmc-fe-sidebar-brand .brand-title span {
    display: block;
    font-size: 10px;
    color: var(--crmc-accent-gold);
    font-weight: 700;
}

.crmc-fe-sidebar-close {
    display: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
}

.crmc-fe-nav {
    list-style: none;
    padding: 15px 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.crmc-fe-nav li {
    padding: 12px 24px;
    font-size: 13.5px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.crmc-fe-nav li:hover {
    color: #fff;
    background: rgba(255,255,255,0.04);
}

.crmc-fe-nav li.active {
    color: #fff;
    background: var(--crmc-accent-blue);
    border-left: 4px solid var(--crmc-accent-gold);
}

.crmc-fe-sidebar-footer {
    padding: 18px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.crmc-fe-logout-btn {
    display: block;
    padding: 10px;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
}

.crmc-fe-logout-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fff;
}

/* Main Area Right */
.crmc-fe-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: #f8fafc;
}

/* Topbar Header */
.crmc-fe-topbar {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid var(--crmc-border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.crmc-fe-topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.crmc-fe-hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    gap: 4px;
}

.crmc-fe-hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #334155;
    border-radius: 2px;
}

.topbar-title-text {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    color: #0f172a;
}

.crmc-fe-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crmc-fe-user-profile .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.crmc-fe-user-profile .user-info {
    display: flex;
    flex-direction: column;
}

.crmc-fe-user-profile .user-name {
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
}

.crmc-fe-user-profile .user-role {
    font-size: 10.5px;
    color: #64748b;
}

/* Scrollable Body Content */
.crmc-fe-app-body {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
    box-sizing: border-box;
}

.crmc-fe-tab-pane {
    display: none;
}

.crmc-fe-tab-pane.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

.crmc-fe-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.crmc-fe-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

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

.crmc-fe-card {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--crmc-border);
    box-shadow: var(--crmc-card-shadow);
}

.crmc-fe-card .card-num {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 2px;
}

.crmc-fe-card .card-desc {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

/* Responsive Table Wrapper */
.crmc-fe-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

.crmc-fe-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 999;
}

/* Login Box Wrapper */
.crmc-fe-login-wrapper {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.crmc-fe-login-box {
    background: #fff;
    width: 90%;
    max-width: 440px;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.crmc-fe-login-header {
    text-align: center;
    margin-bottom: 24px;
}

.crmc-fe-logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--crmc-accent-gold);
    margin-bottom: 6px;
}

.crmc-fe-login-header h2 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: #0f172a;
}

.crmc-fe-login-header p {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
}

.crmc-fe-form-group {
    margin-bottom: 15px;
}

.crmc-fe-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 12.5px;
    color: #334155;
}

.crmc-fe-form-group input, .crmc-fe-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13.5px;
    box-sizing: border-box;
    color: #0f172a;
    background: #ffffff;
}

.crmc-fe-btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--crmc-accent-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.crmc-fe-btn-submit:hover {
    background: #1d4ed8;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .crmc-fe-hamburger-btn {
        display: flex;
    }

    .crmc-fe-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 270px;
        transform: translateX(-100%);
    }

    .crmc-fe-sidebar.sidebar-open {
        transform: translateX(0);
    }

    .crmc-fe-sidebar-close {
        display: block;
    }

    .crmc-fe-sidebar-overlay.active {
        display: block;
    }

    .topbar-title-text {
        font-size: 13.5px;
    }

    .crmc-fe-app-body {
        padding: 14px;
    }
}

.crmc-fe-app-container h2,
.crmc-modal-content h2 {
    font-size: 20px !important;
}
.crmc-fe-app-container h3,
.crmc-modal-content h3 {
    font-size: 18px !important;
}
