@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
    --bg-dark: #0b0f19;
    --card-dark: #121826;
    --card-border: #1f293d;
    --accent-primary: #6366f1;
    --accent-hover: #4f46e5;
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    --accent-warning: #f59e0b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --sidebar-width: 260px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.mono-font {
    font-family: 'JetBrains Mono', monospace;
    direction: ltr;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    background: var(--card-dark);
    border-left: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--card-border);
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.brand-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.sidebar-nav {
    list-style: none;
    padding: 1rem 0.75rem;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.nav-item {
    margin-bottom: 0.35rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.12);
}

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

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

.main-content {
    margin-right: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

/* Header */
.top-header {
    background: var(--card-dark);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Glass & Card Styles */
.stat-card {
    background: var(--card-dark);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.stat-icon.success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.stat-icon.warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.stat-icon.info { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }

.stat-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Content Card */
.content-card {
    background: var(--card-dark);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.75rem;
}

.card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--card-border);
}

.card-title-custom {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tables */
.table-dark-custom {
    width: 100%;
    color: var(--text-primary);
    border-collapse: separate;
    border-spacing: 0;
}

.table-dark-custom th {
    background: rgba(30, 41, 59, 0.5);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.85rem 1rem;
    text-align: right;
    border-bottom: 1px solid var(--card-border);
}

.table-dark-custom td {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.table-dark-custom tr:hover td {
    background: rgba(99, 102, 241, 0.04);
}

/* Badges */
.badge-custom {
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-info { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }
.badge-secondary { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }

/* Custom Inputs & Forms */
.form-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control-custom {
    background: #0f172a;
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.2s;
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn-primary-custom {
    background: linear-gradient(90deg, #6366f1, #4f46e5);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary-custom:hover {
    background: linear-gradient(90deg, #4f46e5, #4338ca);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-danger-custom {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-custom:hover {
    background: #ef4444;
    color: white;
}

/* File Upload Dropzone */
.upload-dropzone {
    border: 2px dashed #334155;
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #0f172a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-dropzone:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.dropzone-icon {
    font-size: 2.8rem;
    color: var(--accent-primary);
    margin-bottom: 0.75rem;
}

/* Live Typography Preview Box */
.live-preview-box {
    background: #0f172a;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.preview-rendered-fa {
    font-size: 1.7rem;
    color: #38bdf8;
    margin-bottom: 1rem;
    min-height: 45px;
    line-height: 1.5;
}

.preview-rendered-en {
    font-size: 1.5rem;
    color: #c084fc;
    min-height: 40px;
    line-height: 1.4;
    direction: ltr;
    text-align: left;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        right: -260px;
    }
    .sidebar.show {
        right: 0;
    }
    .main-content {
        margin-right: 0;
    }
}
