/* // this EPP system has been developed by Abdulaziz AlShihabi
// File Function: Centralized Global Stylesheet
// Methods/Logic: 
//   - Root variables for Digitus theme colors.
//   - Shared layout (navbar, footer, main container).
//   - Component-specific styles (Training Matrix, Chatbot Widget).
// Directory: /style.css
*/

:root,
:root[data-theme="digitus"] {
    --primary-color: #ea0029;
    /* Digitus Red */
    --secondary-color: #fff;
    /* Digitus Dark Slate */
    --accent-color: #1863dc;
    /* Digitus Blue */
    --light-bg: #fbfbfb;
    --bs-danger: #ea0029;
    --bs-danger-rgb: 234, 0, 41;
    --bs-dark: #111111;
    --bs-dark-rgb: 17, 17, 17;

    /* Exact Digitus Styles */
    --header-bg: #ffffff;
    --header-border: #ea0029;
    --header-text: #53565A;
    --header-link: #53565A;
    --header-link-hover: #ea0029;
    --header-logo-filter: invert(0);
    --link-color: #ea0029;
    --link-hover-color: #1863dc;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --link-font-size: 16px;
}

:root[data-theme="legacy"] {
    --primary-color: #E00020;
    /* Legacy EPP Red */
    --secondary-color: #fff;
    /* Legacy Dark */
    --accent-color: #54555A;
    --light-bg: #f8f9fa;
    --bs-danger: #E00020;
    --bs-danger-rgb: 224, 0, 32;
    --bs-dark: #222222;
    --bs-dark-rgb: 34, 34, 34;

    /* Legacy EPP Styles */
    --header-bg: #222222;
    --header-border: #E00020;
    --header-text: #ffffff;
    --header-link: rgba(255, 255, 255, 0.85);
    --header-link-hover: #ffffff;
    --header-logo-filter: invert(1);
    --link-color: #0d6efd;
    --link-hover-color: #0a58ca;
    --font-family: 'Inter', sans-serif;
    --link-font-size: inherit;
}

/* General Layout */
body {
    font-family: var(--font-family);
    background-color: var(--light-bg);
    min-height: 100vh;
    padding-top: 95px;
}

a {
    color: var(--link-color);
    font-size: var(--link-font-size);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--link-hover-color);
}

.navbar {
    background-color: var(--header-bg) !important;
    border-bottom: 3px solid var(--header-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.main-content {
    padding-bottom: 60px;
}

/* Partner Status Badges */
.badge-active {
    background-color: #198754;
    color: white;
}

.badge-queued {
    background-color: #fd7e14;
    color: white;
}

.badge-critical {
    background-color: #ffc107;
    color: black;
}

.badge-roadmap {
    background-color: #000080;
    color: white;
}

/* Dashboard Cards */
.card {
    border: none;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-3px);
}

/* Sales Training Matrix Table Styles */
.training-table th,
.training-table td {
    font-size: 0.85rem;
    vertical-align: middle;
    text-align: center;
}

.training-table .bg-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

.border-thick-right {
    border-right: 3px solid #dee2e6 !important;
}

.lob-master-cell.editable {
    cursor: pointer;
}

.lob-master-cell.editable:hover {
    background-color: #dee2e6;
}

/* Chatbot Widget Styles */
#chatWidget {
    width: 350px;
    height: 450px;
    z-index: 1060;
    bottom: 80px !important;
    border-radius: 15px;
    overflow: hidden;
}

#chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

#chat-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

#chat-icon:hover {
    transform: scale(1.1);
}

/* Login Page Customization */
.login-card {
    width: 100%;
    max-width: 400px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-brand {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.btn-brand:hover {
    background-color: #c0001a;
    color: white;
}

/* Footer Styles */
.footer {
    background-color: #ffffff;
    border-top: 1px solid #dee2e6;
}

.login-page-body {
    background-color: var(--light-bg);
    height: 100vh;
    display: flex;
    align-items: center;
    /* Vertical Center */
    justify-content: center;
    /* Horizontal Center */
    margin: 0;
    padding: 0;
}

.login-card {
    width: 100%;
    max-width: 420px;
    /* Professional width */
    border: none;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-logo {
    width: 180px;
    height: auto;
    margin-bottom: 20px;
}

/* ---- Extracted from login.php ---- */
.login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border-top: 5px solid #E00020;
    overflow: hidden;
}

.btn-brand {
    background-color: #E00020;
    color: white;
    border: none;
    font-weight: 700;
    padding: 14px;
    border-radius: 12px;
    transition: all 0.3s;
}

.btn-brand:hover {
    background-color: #c0001b;
    transform: translateY(-2px);
    color: white;
}

.form-control {
    border-radius: 10px;
    padding: 12px;
}

.x-small {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



/* ---- Extracted from verify_2fa.php ---- */
.verification-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border-top: 5px solid #E00020;
}

.btn-otp {
    background: #E00020;
    color: white;
    border: none;
    font-weight: 700;
    padding: 15px;
    border-radius: 12px;
    transition: all 0.3s;
}

.btn-otp:hover {
    background: #c0001b;
    transform: translateY(-2px);
}

.otp-input {
    letter-spacing: 0.5rem;
    font-size: 1.8rem;
}

/* ---- Extracted from logout.php ---- */
.logout-container {
    max-width: 450px;
    width: 100%;
}

.logout-card {
    border: none;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border-top: 5px solid var(--primary-color);
}

/* ---- NATIVE MOBILE APP OVERRIDE ---- */
@media (max-width: 768px) {
    body {
        padding-top: 60px !important;
        padding-bottom: 80px !important;
        background-color: #f0f2f5;
        font-size: 15px;
    }

    /* Hide Desktop Nav */
    .navbar.fixed-top {
        display: none !important;
    }

    /* Mobile Header */
    .mobile-app-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #ffffff;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        z-index: 1030;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }

    .mobile-app-header .brand-logo {
        height: 30px;
        width: auto;
    }

    /* Mobile Bottom Navigation */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 70px;
        background: #ffffff;
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1040;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        border-top: 1px solid #eee;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #8e8e93;
        text-decoration: none;
        flex: 1;
        transition: color 0.2s;
    }

    .mobile-nav-item i {
        font-size: 22px;
        margin-bottom: 2px;
    }

    .mobile-nav-item span {
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
    }

    .mobile-nav-item.active {
        color: var(--primary-color);
    }

    /* Card Optimizations */
    .container, .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .card {
        border-radius: 16px !important;
        margin-bottom: 12px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
    }

    .card-header {
        border-radius: 16px 16px 0 0 !important;
        padding: 12px 16px !important;
    }

    /* Button Optimizations */
    .btn {
        border-radius: 12px !important;
        padding: 10px 16px !important;
        font-weight: 600 !important;
    }

    /* Hide redundant web-specific elements */
    .breadcrumb {
        display: none !important;
    }

    h1, h2, h3 {
        font-size: 1.4rem !important;
        letter-spacing: -0.5px;
    }
}

/* More Menu Drawer */
#mobileMoreMenu {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: white;
    z-index: 1050;
    border-radius: 24px 24px 0 0;
    padding: 24px;
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
}

#mobileMoreMenu.show {
    bottom: 0;
}

.more-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1045;
    display: none;
}

.more-menu-overlay.show {
    display: block;
}

.more-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.more-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #444;
    padding: 12px;
    border-radius: 12px;
    background: #f8f9fa;
    text-decoration: none;
}

.more-item i {
    font-size: 24px;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.more-item span {
    font-size: 11px;
    font-weight: 600;
}