/* ============================================================
   MOLO CS Complains & Feedback - Custom Styles (Arabic RTL)
   ============================================================ */

:root {
    --molo-navy:  #1a3c5e;
    --molo-amber: #e8a020;
    --molo-light: #f4f7fb;
    --sidebar-w:  260px;
}

/* ---- Base ---- */
body {
    background: var(--molo-light);
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 0.95rem;
    color: #2d3748;
}

/* ---- Top Navbar ---- */
.molo-navbar {
    background: var(--molo-navy);
    height: 56px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* ---- Sidebar ---- */
.molo-sidebar {
    background: var(--molo-navy);
    width: var(--sidebar-w);
    min-height: calc(100vh - 56px);
    position: fixed;
    top: 56px;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1030;
    padding: 12px 0;
    transition: transform 0.3s ease;
}

.sidebar-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    padding: 8px 20px 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
    border-right: 3px solid transparent;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar-link.active {
    background: rgba(232,160,32,0.15);
    color: var(--molo-amber);
    border-right-color: var(--molo-amber);
    font-weight: 600;
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* ---- Main Content ---- */
#wrapper {
    padding-top: 56px;
}

#content {
    margin-right: var(--sidebar-w);
    min-height: calc(100vh - 56px);
}

.content-inner {
    padding: 24px;
}

/* ---- Page Header ---- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--molo-navy);
    margin: 0;
}

/* ---- Cards ---- */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: var(--molo-navy);
    border-radius: 12px 12px 0 0 !important;
}

/* ---- Stat Cards ---- */
.stat-card {
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.25;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 4px;
}

.stat-navy  { background: linear-gradient(135deg, #1a3c5e, #2a5a8e); }
.stat-red   { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.stat-amber { background: linear-gradient(135deg, #d68910, #e8a020); }
.stat-green { background: linear-gradient(135deg, #1e8449, #27ae60); }

/* ---- Meal Deficiency Alert ---- */
.meal-deficiency-alert {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(231,76,60,0.35);
    animation: pulse-alert 2s infinite;
}

@keyframes pulse-alert {
    0%, 100% { box-shadow: 0 4px 16px rgba(231,76,60,0.35); }
    50%       { box-shadow: 0 4px 24px rgba(231,76,60,0.6); }
}

.meal-deficiency-alert .alert-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.meal-deficiency-alert .alert-body {
    flex: 1;
}

.meal-deficiency-alert .alert-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.meal-deficiency-alert .alert-note {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ---- Tables ---- */
.table th {
    background: #f8fafc;
    color: var(--molo-navy);
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

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

/* ---- Badges ---- */
.badge {
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 20px;
}

/* ---- Forms ---- */
.form-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.88rem;
    margin-bottom: 4px;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #d1d9e0;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--molo-navy);
    box-shadow: 0 0 0 3px rgba(26,60,94,0.12);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* ---- Buttons ---- */
.btn-primary {
    background: var(--molo-navy);
    border-color: var(--molo-navy);
}

.btn-primary:hover {
    background: #14304e;
    border-color: #14304e;
}

.btn-amber {
    background: var(--molo-amber);
    border-color: var(--molo-amber);
    color: #fff;
}

.btn-amber:hover {
    background: #c8880e;
    border-color: #c8880e;
    color: #fff;
}

/* ---- Login Page ---- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--molo-navy) 0%, #2a5a8e 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.login-logo {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--molo-amber);
    letter-spacing: 0.05em;
}

/* ---- Search highlight ---- */
.search-highlight {
    background: #fff3cd;
    padding: 1px 3px;
    border-radius: 3px;
}

/* ---- Customer profile ---- */
.customer-phone-badge {
    display: inline-block;
    background: #e8f4fd;
    color: #1a3c5e;
    border: 1px solid #bee3f8;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.85rem;
    margin: 2px;
    font-family: monospace;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .molo-sidebar {
        transform: translateX(100%);
    }

    .molo-sidebar.show {
        transform: translateX(0);
    }

    #content {
        margin-right: 0;
    }
}

/* ---- Misc ---- */
.section-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 20px 0;
}

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

.bg-navy {
    background: var(--molo-navy) !important;
}

.border-amber {
    border-color: var(--molo-amber) !important;
}

.complaint-text-preview {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Filter bar */
.filter-bar {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}
