/* 
    ADM - Antwerp Diamond Market 
    Premium B2B Jeweler Network Styles 
*/
:root {
    --main-bg: #f3f3f3;
    --panel-bg: #ffffff;
    --border-color: #e5e7eb;
    --gold: #d4af37;
    --gold-hover: #b8972e;
    --gold-light: rgba(212, 175, 55, 0.15);
    --text-main: #000000;
    --text-muted: #64748b;

    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.3s ease;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(212, 175, 55, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--main-bg);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--gold);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: var(--text-muted);
    transition: var(--transition);
}

a:hover {
    color: var(--text-main);
}

/* =======================================
   LOGIN PAGE
======================================= */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at center, #ffffff 0%, #f3f3f3 100%);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--gold-light) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    filter: blur(80px);
    z-index: 0;
    animation: pulse 10s infinite alternate;
}

.login-body::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--gold-light) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    filter: blur(60px);
    z-index: 0;
    animation: pulse 8s infinite alternate-reverse;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 900px;
    padding: 40px 20px;
    margin: auto;
}

.login-wrapper {
    display: flex;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.login-left {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(243, 243, 243, 1) 100%);
    border-right: 1px solid var(--glass-border);
    text-align: center;
}

.logo-box img {
    max-width: 140px;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.3));
}

.logo-title {
    font-size: 24px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #8c7322, #d4af37, #8c7322);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtitle {
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--text-main);
    text-transform: uppercase;
}

.login-right {
    flex: 1.2;
    padding: 60px 50px;
    background: rgba(255, 255, 255, 0.6);
}

.login-form-container h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.login-desc {
    color: var(--text-main);
    margin-bottom: 40px;
    font-size: 14px;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background: rgba(220, 38, 38, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.input-group {
    margin-bottom: 22px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon i {
    position: absolute;
    left: 15px;
    color: var(--text-main);
}

.input-icon input {
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 14px 15px 14px 45px;
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.input-icon input::placeholder,
.input-group textarea::placeholder {
    color: var(--text-muted);
}

.input-icon select {
    appearance: none;
    -webkit-appearance: none;
    color: var(--text-main);
}

.input-icon select:invalid {
    color: var(--text-muted);
}

.input-icon select option {
    color: var(--text-main);
}

.input-icon input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    position: relative;
    padding-left: 25px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 16px;
    width: 16px;
    background-color: transparent;
    border: 1px solid var(--text-muted);
    border-radius: 4px;
    transition: var(--transition);
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--gold);
    border-color: var(--gold);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid black;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.forgot-pass {
    font-size: 13px;
    color: var(--gold);
}

.forgot-pass:hover {
    text-decoration: underline;
}

.demo-credentials {
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    color: #888;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(90deg, #b8972e 0%, #d4af37 50%, #b8972e 100%);
    background-size: 200% auto;
    color: #000;
    border: none;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background-position: right center;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-weight: 500;
}

.gold-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    transition: var(--transition);
}

.gold-btn:hover {
    background: var(--gold);
    color: #000;
}

.full-width {
    width: 100%;
}

.gold-text {
    color: var(--gold) !important;
}

/* =======================================
   DASHBOARD LAYOUT
======================================= */
.dashboard-body {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.sidebar {
    width: 260px;
    background: var(--panel-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-logo {
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo h2 {
    font-size: 36px;
    letter-spacing: 4px;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.sub-logo {
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    padding: 30px 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 15px 30px;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
}

.sidebar-nav a i {
    width: 25px;
    font-size: 16px;
    color: #666;
    transition: var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav li.active a {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.04);
}

.sidebar-nav a:hover i,
.sidebar-nav li.active a i {
    color: var(--gold);
}

.sidebar-nav li.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
}

.badge {
    background: var(--gold);
    color: #000;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: bold;
}

.sidebar-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.user-info strong {
    display: block;
    font-size: 13px;
    color: var(--text-main);
}

.user-info span {
    font-size: 11px;
    color: var(--text-muted);
}

.logout-btn {
    color: var(--text-muted);
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

.logout-btn:hover {
    color: #f87171;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--main-bg);
}

.topbar {
    height: 80px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-menu-toggle,
.sidebar-overlay,
.sidebar-header-mobile,
.close-sidebar {
    display: none;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 10px 20px;
    width: 400px;
}

.search-bar i {
    color: var(--text-muted);
    margin-right: 12px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 100%;
    outline: none;
    font-size: 13px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--text-main);
}

.icon-btn .dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--main-bg);
}

.dashboard-grid {
    padding: 40px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.welcome-banner {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.welcome-banner::after {
    content: '\f219';
    /* Diamond icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: -20px;
    font-size: 150px;
    color: rgba(212, 175, 55, 0.03);
    pointer-events: none;
}

.welcome-banner h2 {
    margin-bottom: 8px;
    font-size: 28px;
}

.welcome-banner p {
    color: var(--text-main);
    max-width: 600px;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.3);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    font-size: 24px;
}

.stat-info h3 {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-info h2 {
    font-family: var(--font-body);
    font-size: 28px;
    color: var(--text-main);
    margin: 0;
}

.feed-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-list {
    list-style: none;
}

.activity-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.activity-list li:last-child {
    border-bottom: none;
}

.act-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    color: var(--gold);
    display: flex;
    justify-content: center;
    align-items: center;
}

.act-text {
    flex: 1;
    font-size: 13px;
    color: #4b5563;
}

.act-text strong {
    color: var(--text-main);
}

.act-text .time {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
}

/* Right Panel */
.chat-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.chat-header h3 {
    font-size: 16px;
    margin: 0;
}

.chat-header a {
    font-size: 12px;
    color: var(--gold);
}

.message-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msg-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.msg-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.msg-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #8c7322);
    color: #000;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
}

.msg-content {
    flex: 1;
    overflow: hidden;
}

.msg-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.msg-top h4 {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-time {
    font-size: 11px;
    color: #6b7280;
}

.msg-content p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-item.unread .msg-content p {
    color: var(--text-main);
    font-weight: 500;
}

.unread-indicator {
    position: absolute;
    top: 20px;
    right: 15px;
    width: 10px;
    height: 10px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--gold);
}

.socket-info {
    margin-top: 20px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #10b981;
    font-size: 12px;
    font-weight: 500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: blink 2s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

/* Mobile Repsonse */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        transition: var(--transition);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .sidebar-active .sidebar {
        left: 0;
    }

    .topbar {
        display: none !important;
    }

    .main-content {
        padding-top: 0 !important;
        width: 100%;
        overflow-x: hidden;
    }

    .dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        padding: 15px !important;
        gap: 15px !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: var(--gold-light);
        color: var(--gold);
        border: none;
        border-radius: 10px;
        font-size: 20px;
        cursor: pointer;
    }

    /* Prevent iOS zoom on focus */
    input,
    textarea,
    select {
        font-size: 16px !important;
    }

    /* Hide drawer menu button when an active chat is open on mobile */
    .sidebar-active.chat-open .mobile-menu-toggle,
    .chat-open .mobile-menu-toggle {
        display: none;
    }

    .search-bar {
        display: none;
    }

    .stats-row {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .stat-card {
        padding: 20px !important;
    }

    .glass-panel {
        padding: 20px !important;
        width: 100% !important;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        z-index: 999;
    }

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

    .sidebar-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .close-sidebar {
        display: flex;
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 20px;
    }

    .topbar-actions .btn-new-request span {
        display: none;
    }

    .btn-new-request {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }

    .login-wrapper {
        flex-direction: column;
    }

    .login-left {
        padding: 40px 20px;
    }

    .logo-box img {
        max-width: 100px;
    }

    .login-right {
        padding: 40px;
    }
}

/* Adjustments for smaller screens */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        gap: 20px;
    }
}

/* Mobile Bottom Navigation (WhatsApp Style) */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 1024px) {
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    .main-content {
        padding-bottom: 65px !important;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    gap: 4px;
    flex: 1;
    position: relative;
}

.nav-badge {
    position: absolute;
    top: 5px;
    right: 20%;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.nav-item i {
    font-size: 20px;
    transition: var(--transition);
}

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

.nav-item.active i {
    transform: translateY(-2px);
}