:root {
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --accent: #f59e0b;
    --success: #10b981;
    --bg: #fafbff;
    --card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --card: #1e293b;
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --border: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

#organic-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-radius: 16px;
    padding: 1.5rem;
}

[data-theme="dark"] .glass-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.nav-glass {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

/* Ensure nav buttons are aligned */
nav .flex.items-center {
    align-items: center !important;
}

nav .flex.items-center > * {
    display: inline-flex !important;
    align-items: center !important;
}

[data-theme="dark"] .nav-glass {
    background: rgba(15, 23, 42, 0.85) !important;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.sidebar {
    position: fixed;
    right: 0;
    top: 64px;
    width: 280px;
    height: calc(100vh - 64px);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    padding: 2rem 1rem;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 40;
}

[data-theme="dark"] .sidebar {
    background: rgba(30, 41, 59, 0.9);
    border-left: 1px solid rgba(71, 85, 105, 0.3);
}

.sidebar-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

.sidebar-item.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.main-content {
    margin-right: 280px;
    padding: 2rem;
    min-height: calc(100vh - 64px);
    margin-top: 64px;
}

.theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

[data-theme="dark"] .btn-secondary {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(71, 85, 105, 0.5);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    background: #ef4444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #dc2626;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.profile-card {
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-card:hover {
    border-color: var(--primary);
    transform: translateX(-5px);
}

.profile-card.active {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card);
    padding: 2rem;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.hidden {
    display: none !important;
}

.journal-card {
    background: var(--card);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.journal-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.2);
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.25rem;
}

.tag-buy { background: rgba(34, 197, 94, 0.2); color: #16a34a; }
.tag-sell { background: rgba(239, 68, 68, 0.2); color: #dc2626; }
.tag-tp { background: rgba(34, 197, 94, 0.2); color: #16a34a; }
.tag-sl { background: rgba(239, 68, 68, 0.2); color: #dc2626; }
.tag-be { background: rgba(245, 158, 11, 0.2); color: #d97706; }

.quality-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #64748b;
}

[data-theme="dark"] .quality-btn {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(71, 85, 105, 0.4);
    color: #cbd5e1;
}

.quality-btn:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
    color: var(--primary);
}

[data-theme="dark"] .quality-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
}

.quality-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.4);
    font-weight: 700;
}

[data-theme="dark"] .quality-btn.active {
    background: rgba(59, 130, 246, 0.7);
    border-color: rgba(59, 130, 246, 0.5);
    color: white;
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.quick-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}

.quick-select-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.quick-select-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.quick-select-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.quick-btn {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.quick-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    background: rgba(59, 130, 246, 0.05);
    color: var(--primary);
}

.quick-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.4);
    font-weight: 700;
}

.quick-btn-buy {
    color: #059669;
}

.quick-btn-buy:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: #10b981;
    color: #059669;
}

.quick-btn-buy.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    color: #059669;
    border-color: rgba(16, 185, 129, 0.4);
}

.quick-btn-sell {
    color: #dc2626;
}

.quick-btn-sell:hover {
    background: rgba(239, 68, 68, 0.05);
    border-color: #ef4444;
    color: #dc2626;
}

.quick-btn-sell.active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.4);
}

.quick-btn-tp {
    color: #059669;
}

.quick-btn-tp:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: #10b981;
    color: #059669;
}

.quick-btn-tp.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    color: #059669;
    border-color: rgba(16, 185, 129, 0.4);
}

.quick-btn-sl {
    color: #dc2626;
}

.quick-btn-sl:hover {
    background: rgba(239, 68, 68, 0.05);
    border-color: #ef4444;
    color: #dc2626;
}

.quick-btn-sl.active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.4);
}

.quick-btn-be {
    color: #d97706;
}

.quick-btn-be:hover {
    background: rgba(245, 158, 11, 0.05);
    border-color: #f59e0b;
    color: #d97706;
}

.quick-btn-be.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.4);
}

.symbol-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .text-gray-900 { color: #f1f5f9 !important; }
[data-theme="dark"] .text-gray-700 { color: #cbd5e1 !important; }
[data-theme="dark"] .text-gray-600 { color: #94a3b8 !important; }
[data-theme="dark"] .text-gray-500 { color: #94a3b8 !important; }
[data-theme="dark"] .bg-white { background-color: #1e293b !important; }
[data-theme="dark"] .border-gray-200 { border-color: #334155 !important; }


/* Database Path Button */
#dbPathBtn {
    font-weight: 600;
    cursor: pointer;
}

#dbPathBtn.not-set {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

#dbPathBtn.not-set:hover {
    background: rgba(239, 68, 68, 0.1);
}

#dbPathBtn.is-set {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

#dbPathBtn.is-set:hover {
    background: rgba(16, 185, 129, 0.1);
}

[data-theme="dark"] #dbPathBtn.not-set {
    border-color: #f87171;
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}

[data-theme="dark"] #dbPathBtn.is-set {
    border-color: #34d399;
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
}


/* Quick Select Buttons */
.quick-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.quick-select-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.quick-select-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.quick-select-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .quick-select-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.quick-btn {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

[data-theme="dark"] .quick-btn {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(71, 85, 105, 0.4);
    color: #cbd5e1;
}

.quick-btn:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

[data-theme="dark"] .quick-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
}

.quick-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

[data-theme="dark"] .quick-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(139, 92, 246, 0.8));
    border-color: rgba(59, 130, 246, 0.6);
}

.quick-btn-buy {
    border-color: #10b981;
    color: #10b981;
}

[data-theme="dark"] .quick-btn-buy {
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.05);
}

.quick-btn-buy:hover,
.quick-btn-buy.active {
    background: #10b981;
    color: white;
}

[data-theme="dark"] .quick-btn-buy:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.6);
}

[data-theme="dark"] .quick-btn-buy.active {
    background: rgba(16, 185, 129, 0.7);
    border-color: rgba(16, 185, 129, 0.5);
}

.quick-btn-sell {
    border-color: #ef4444;
    color: #ef4444;
}

[data-theme="dark"] .quick-btn-sell {
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.05);
}

.quick-btn-sell:hover,
.quick-btn-sell.active {
    background: #ef4444;
    color: white;
}

[data-theme="dark"] .quick-btn-sell:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.6);
}

[data-theme="dark"] .quick-btn-sell.active {
    background: rgba(239, 68, 68, 0.7);
    border-color: rgba(239, 68, 68, 0.5);
}

.quick-btn-tp {
    border-color: #10b981;
    color: #10b981;
}

[data-theme="dark"] .quick-btn-tp {
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.05);
}

.quick-btn-tp:hover,
.quick-btn-tp.active {
    background: #10b981;
    color: white;
}

[data-theme="dark"] .quick-btn-tp:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.6);
}

[data-theme="dark"] .quick-btn-tp.active {
    background: rgba(16, 185, 129, 0.7);
    border-color: rgba(16, 185, 129, 0.5);
}

.quick-btn-sl {
    border-color: #ef4444;
    color: #ef4444;
}

[data-theme="dark"] .quick-btn-sl {
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.05);
}

.quick-btn-sl:hover,
.quick-btn-sl.active {
    background: #ef4444;
    color: white;
}

[data-theme="dark"] .quick-btn-sl:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.6);
}

[data-theme="dark"] .quick-btn-sl.active {
    background: rgba(239, 68, 68, 0.7);
    border-color: rgba(239, 68, 68, 0.5);
}

.quick-btn-be {
    border-color: #f59e0b;
    color: #f59e0b;
}

[data-theme="dark"] .quick-btn-be {
    border-color: rgba(245, 158, 11, 0.4);
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.05);
}

.quick-btn-be:hover,
.quick-btn-be.active {
    background: #f59e0b;
    color: white;
}

[data-theme="dark"] .quick-btn-be:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.6);
}

[data-theme="dark"] .quick-btn-be.active {
    background: rgba(245, 158, 11, 0.7);
    border-color: rgba(245, 158, 11, 0.5);
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .quality-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}


/* Form Sections with Colors */
.form-section {
    background: var(--card);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.form-section:hover {
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid;
}

.form-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.form-section-title {
    font-size: 1.125rem;
    font-weight: 700;
}

/* Section Colors */
.section-blue {
    border-left-color: #3b82f6;
}

.section-blue .form-section-header {
    border-bottom-color: rgba(59, 130, 246, 0.2);
}

.section-blue .form-section-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.section-purple {
    border-left-color: #8b5cf6;
}

.section-purple .form-section-header {
    border-bottom-color: rgba(139, 92, 246, 0.2);
}

.section-purple .form-section-icon {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.section-green {
    border-left-color: #10b981;
}

.section-green .form-section-header {
    border-bottom-color: rgba(16, 185, 129, 0.2);
}

.section-green .form-section-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.section-amber {
    border-left-color: #f59e0b;
}

.section-amber .form-section-header {
    border-bottom-color: rgba(245, 158, 11, 0.2);
}

.section-amber .form-section-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.section-red {
    border-left-color: #ef4444;
}

.section-red .form-section-header {
    border-bottom-color: rgba(239, 68, 68, 0.2);
}

.section-red .form-section-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.section-pink {
    border-left-color: #ec4899;
}

.section-pink .form-section-header {
    border-bottom-color: rgba(236, 72, 153, 0.2);
}

.section-pink .form-section-icon {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

[data-theme="dark"] .form-section {
    background: rgba(30, 41, 59, 0.5);
}

[data-theme="dark"] .form-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Custom input with icon */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.input-with-icon input {
    padding-right: 40px;
}


/* ========================================
   COMPACT FORM STYLES - جذاب و فشرده
   ======================================== */

/* Compact Form Container */
#journalForm {
    max-width: 1400px;
    margin: 0 auto;
}

/* Compact Section Cards */
.compact-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
                0 10px 15px -3px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.compact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.5;
}

.compact-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -5px rgba(59, 130, 246, 0.15),
                0 10px 20px -5px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .compact-section {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(71, 85, 105, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2),
                0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .compact-section:hover {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(71, 85, 105, 0.3);
}

/* Section Header - Compact */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .section-header {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Color Themes */
.theme-blue {
    color: #3b82f6;
}

.theme-blue::before {
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
}

.theme-blue .section-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.theme-purple {
    color: #8b5cf6;
}

.theme-purple::before {
    background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
}

.theme-purple .section-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.theme-green {
    color: #10b981;
}

.theme-green::before {
    background: linear-gradient(90deg, transparent, #10b981, transparent);
}

.theme-green .section-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.theme-amber {
    color: #f59e0b;
}

.theme-amber::before {
    background: linear-gradient(90deg, transparent, #f59e0b, transparent);
}

.theme-amber .section-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.theme-pink {
    color: #ec4899;
}

.theme-pink::before {
    background: linear-gradient(90deg, transparent, #ec4899, transparent);
}

.theme-pink .section-icon {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white;
}

.theme-red {
    color: #ef4444;
}

.theme-red::before {
    background: linear-gradient(90deg, transparent, #ef4444, transparent);
}

.theme-red .section-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* Compact Form Group */
.compact-section .form-group {
    margin-bottom: 0.75rem;
}

.compact-section .form-group:last-child {
    margin-bottom: 0;
}

.compact-section .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    display: block;
}

/* Compact Inputs */
.compact-section .form-input,
.compact-section .form-select,
.compact-section .form-textarea {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

.compact-section .form-textarea {
    min-height: 70px;
}

/* Compact Quick Buttons */
.compact-section .quick-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 8px;
}

.compact-section .quality-btn {
    padding: 0.5rem;
    font-size: 0.875rem;
}

/* Grid Layouts - More Compact */
.grid-compact-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.grid-compact-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.grid-compact-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

@media (max-width: 1024px) {
    .grid-compact-3,
    .grid-compact-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-compact-2,
    .grid-compact-3,
    .grid-compact-4 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Compact Action Buttons */
.form-actions-compact {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
}

.form-actions-compact button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
}

@media (max-width: 640px) {
    .form-actions-compact {
        flex-direction: column;
    }
}

/* Required Star - Smaller */
.compact-section .required-star {
    color: #ef4444;
    font-size: 0.75rem;
    margin-left: 0.125rem;
}

.required-star {
    color: #ef4444;
    font-weight: 700;
    margin-left: 0.25rem;
}

/* Quick Select Grid - More Compact */
.quick-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
}

/* Flex layout for text-based buttons (mistakes, comments) */
.quick-flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
}

.quick-flex-wrap .quick-btn {
    flex: 0 0 auto;
    white-space: normal;
    word-break: break-word;
    text-align: center;
    min-width: auto;
    max-width: 100%;
    display: inline-flex;
}

.quick-grid-compact-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.quick-grid-compact-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.quick-grid-compact-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.quick-grid-compact-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .quick-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .quick-grid-compact-4,
    .quick-grid-compact-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Smooth Animations */
.compact-section {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger Animation */
.compact-section:nth-child(1) { animation-delay: 0.05s; }
.compact-section:nth-child(2) { animation-delay: 0.1s; }
.compact-section:nth-child(3) { animation-delay: 0.15s; }
.compact-section:nth-child(4) { animation-delay: 0.2s; }
.compact-section:nth-child(5) { animation-delay: 0.25s; }
.compact-section:nth-child(6) { animation-delay: 0.3s; }

/* Premium Button Style */
.btn-premium-journal {
    position: relative;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -5px rgba(59, 130, 246, 0.4);
}

.btn-premium-journal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.7s;
}

.btn-premium-journal:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -5px rgba(59, 130, 246, 0.5);
}

.btn-premium-journal:hover::before {
    left: 100%;
}

/* Responsive Padding */
@media (max-width: 640px) {
    .compact-section {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .section-header {
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .section-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 0.9375rem;
    }
}

/* Print Styles */
@media print {
    .compact-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
        page-break-inside: avoid;
    }
}


/* ========================================
   RESPONSIVE DESIGN - Mobile, Tablet, Desktop
   ======================================== */

/* Tablet and below (1024px) */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
        padding: 1.5rem 0.75rem;
    }
    
    .main-content {
        margin-right: 240px;
        padding: 1.5rem;
    }
    
    .sidebar-item {
        padding: 0.875rem;
        font-size: 0.9375rem;
    }
}

/* Tablet Portrait and Mobile (768px) */
@media (max-width: 768px) {
    /* Hide sidebar by default o


/* Profile Switcher */
.profile-switcher {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
}

.profile-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem;
    padding: 0 1.125rem;
    height: 2.5rem !important;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3), 0 0 0 0 rgba(59, 130, 246, 0.4);
    font-family: 'Vazirmatn', sans-serif;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4), 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.profile-btn:hover::before {
    opacity: 1;
}

.profile-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.profile-btn i {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
}

.profile-btn i:first-child {
    font-size: 1.125rem;
}

.profile-btn i:last-child {
    font-size: 0.625rem;
    opacity: 0.8;
}

.profile-btn span {
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* Profile button in dark mode */
html[data-theme="dark"] .profile-btn {
    background: linear-gradient(135deg, #334155, #475569) !important;
    color: #f1f5f9 !important;
    box-shadow: 0 4px 12px rgba(51, 65, 85, 0.4), 0 0 0 0 rgba(71, 85, 105, 0.4) !important;
}

[data-theme="dark"] .profile-btn {
    background: linear-gradient(135deg, #334155, #475569) !important;
    color: #f1f5f9 !important;
    box-shadow: 0 4px 12px rgba(51, 65, 85, 0.4), 0 0 0 0 rgba(71, 85, 105, 0.4) !important;
}

html[data-theme="dark"] .profile-btn:hover {
    background: linear-gradient(135deg, #475569, #64748b) !important;
    box-shadow: 0 6px 20px rgba(71, 85, 105, 0.5), 0 0 0 3px rgba(71, 85, 105, 0.2) !important;
}

[data-theme="dark"] .profile-btn:hover {
    background: linear-gradient(135deg, #475569, #64748b) !important;
    box-shadow: 0 6px 20px rgba(71, 85, 105, 0.5), 0 0 0 3px rgba(71, 85, 105, 0.2) !important;
}

.profile-dropdown {
    position: absolute !important;
    top: calc(100% + 0.75rem) !important;
    right: 0 !important;
    left: auto !important;
    min-width: 240px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    border: 2px solid rgba(59, 130, 246, 0.15) !important;
    border-radius: 20px !important;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 10px 20px -5px rgba(59, 130, 246, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-15px) scale(0.92) !important;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    z-index: 10000 !important;
    max-height: 420px !important;
    overflow-y: auto !important;
    padding: 0.5rem !important;
    pointer-events: none !important;
}

[data-theme="dark"] .profile-dropdown:not(.active) {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
    border: 2px solid rgba(139, 92, 246, 0.25) !important;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 10px 20px -5px rgba(139, 92, 246, 0.2),
        0 0 0 1px rgba(139, 92, 246, 0.1) inset !important;
}

[data-theme="dark"] .profile-dropdown.active {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
    border: 2px solid rgba(139, 92, 246, 0.25) !important;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 10px 20px -5px rgba(139, 92, 246, 0.2),
        0 0 0 1px rgba(139, 92, 246, 0.1) inset !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
}

.profile-dropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
}

#profileDropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
}

.profile-dropdown-item {
    padding: 1rem 1.125rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 14px;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1.5px solid transparent;
    position: relative;
    overflow: hidden;
    font-size: 0.9375rem;
    color: #1e293b !important;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
}

.profile-dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-dropdown-item:hover::before {
    opacity: 1;
}

html[data-theme="dark"] .profile-dropdown-item {
    color: #e2e8f0 !important;
    background: rgba(30, 41, 59, 0.4);
}

[data-theme="dark"] .profile-dropdown-item {
    color: #e2e8f0 !important;
    background: rgba(30, 41, 59, 0.4);
}

.profile-dropdown-item:last-child {
    margin-bottom: 0;
}

.profile-dropdown-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.1));
    transform: translateX(-3px) scale(1.02);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

html[data-theme="dark"] .profile-dropdown-item:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(167, 139, 250, 0.18)) !important;
    color: #c4b5fd !important;
    border-color: rgba(139, 92, 246, 0.4);
}

.profile-dropdown-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.2));
    color: #3b82f6 !important;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.4);
}

html[data-theme="dark"] .profile-dropdown-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(167, 139, 250, 0.25)) !important;
    color: #c4b5fd !important;
    border-color: rgba(139, 92, 246, 0.5);
}

.profile-dropdown-item i {
    font-size: 1.125rem;
    color: #3b82f6;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900;
    transition: all 0.3s ease;
}

.profile-dropdown-item:hover i {
    transform: scale(1.1);
}

html[data-theme="dark"] .profile-dropdown-item i {
    color: #a78bfa !important;
}

.profile-dropdown-item i.fa-plus-circle {
    color: #10b981;
}

html[data-theme="dark"] .profile-dropdown-item i.fa-plus-circle {
    color: #34d399 !important;
}

html[data-theme="dark"] .profile-dropdown-item i.fa-plus-circle {
    color: #34d399 !important;
}

/* Profile dropdown item name/text */
.profile-dropdown-item span,
.profile-dropdown-item div {
    color: #1e293b !important;
}

html[data-theme="dark"] .profile-dropdown-item span,
html[data-theme="dark"] .profile-dropdown-item div {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .profile-dropdown-item span,
[data-theme="dark"] .profile-dropdown-item div {
    color: #e2e8f0 !important;
}

/* Empty state */
.profile-dropdown-empty {
    cursor: default !important;
    opacity: 0.6;
    pointer-events: none;
}

/* Create profile button */
.profile-dropdown-create {
    color: #3b82f6;
    font-weight: 600;
}

html[data-theme="dark"] .profile-dropdown-create {
    color: #60a5fa !important;
}

.profile-dropdown-create i {
    margin-left: 0.5rem;
}

/* Scrollbar styling for dropdown */
.profile-dropdown::-webkit-scrollbar {
    width: 6px;
}

.profile-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.profile-dropdown::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 10px;
}

.profile-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* Responsive Sidebar */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0 !important;
    }
}

/* Mobile Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 35;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Tablet Adjustments */
@media (max-width: 1024px) and (min-width: 641px) {
    .profile-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .profile-dropdown {
        min-width: 180px;
    }
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .sidebar {
        width: 85%;
        max-width: 320px;
    }
    
    .profile-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        gap: 0.375rem;
    }
    
    .profile-btn span {
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .profile-btn i:first-child {
        font-size: 1rem;
    }
    
    .profile-dropdown {
        min-width: 160px;
        right: auto;
        left: 0;
    }
    
    .profile-dropdown-item {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }
}

/* Hamburger Menu Animation */
#menuToggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#menuToggle:hover {
    background: rgba(59, 130, 246, 0.1);
}

#menuToggle:active {
    transform: scale(0.95);
}


/* ========================================
   JOURNAL TABLE STYLES - MODERN & ATTRACTIVE
   ======================================== */

.table-container {
    overflow-x: auto;
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    background: white;
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.table-container::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 1.5rem;
    padding: 3px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

[data-theme="dark"] .table-container {
    background: #1e293b;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.journal-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9375rem;
    font-family: 'Vazirmatn', sans-serif !important;
}

/* ========== TABLE HEADER ========== */
.journal-table thead {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.journal-table th {
    padding: 1.5rem 1.75rem;
    text-align: center;
    font-weight: 900;
    color: white;
    border-right: 3px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-family: 'Vazirmatn', sans-serif !important;
    display: table-cell;
    vertical-align: middle;
}

.journal-table th i {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.5rem;
    font-family: 'Font Awesome 6 Free' !important;
}

.journal-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    border-radius: 2px;
}

.journal-table th:last-child {
    border-right: none;
}

/* ========== TABLE BODY ========== */
.journal-table tbody tr {
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

[data-theme="dark"] .journal-table tbody tr {
    background: #1e293b;
}

.journal-table tbody tr::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 4px 4px 0;
}

.journal-table tbody tr:hover::before {
    opacity: 1;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.journal-table tbody tr:hover {
    background: linear-gradient(90deg, #f8fafc 0%, #eff6ff 50%, #f8fafc 100%);
    transform: translateX(6px) scale(1.008);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2);
    z-index: 1;
}

[data-theme="dark"] .journal-table tbody tr:hover {
    background: linear-gradient(90deg, #334155 0%, #3b4a5f 50%, #334155 100%);
}

.journal-table tbody tr:nth-child(even) {
    background: #fafbff;
}

[data-theme="dark"] .journal-table tbody tr:nth-child(even) {
    background: #1a2332;
}

/* ========== TABLE CELLS ========== */
.journal-table td {
    padding: 0.75rem 0.5rem !important;
    border-right: 3px solid #f1f5f9 !important;
    border-bottom: 3px solid #f1f5f9 !important;
    vertical-align: middle !important;
    text-align: center !important;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif !important;
    white-space: nowrap !important;
    font-size: 0.8125rem !important;
}

.journal-table td i {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.25rem;
    font-family: 'Font Awesome 6 Free' !important;
}

[data-theme="dark"] .journal-table td {
    border-right-color: #334155 !important;
    border-bottom-color: #334155 !important;
}

.journal-table td:last-child {
    border-right: none !important;
}

.journal-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* ========== SPECIAL CELLS WITH MORE PADDING ========== */
.journal-table td:nth-last-child(1),
.journal-table td:nth-last-child(2),
.journal-table td:nth-last-child(3) {
    padding: 0.75rem 1.25rem !important;
    white-space: nowrap !important;
    min-width: 120px !important;
}

/* ========== ACTION COLUMN (LAST COLUMN) ========== */
.journal-table td:nth-last-child(1) {
    min-width: 260px !important;
    width: 260px !important;
    max-width: 260px !important;
    padding: 0.75rem 0.25rem !important;
    overflow: visible !important;
}

.journal-table th:nth-last-child(1) {
    min-width: 260px !important;
    width: 260px !important;
}

/* Make action buttons smaller */
.journal-table tbody td:nth-last-child(1) button {
    padding: 0.4rem 0.6rem !important;
    min-width: 32px !important;
    font-size: 0.8125rem !important;
}

/* Force container div to take full width */
.journal-table tbody td:nth-last-child(1) > div {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

/* Prevent buttons from shrinking */
.journal-table tbody td:nth-last-child(1) button {
    flex-shrink: 0 !important;
}

/* ========== COLUMN SPECIFIC STYLES ========== */
.td-number {
    font-weight: 900;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.td-symbol {
    font-weight: 900;
    font-size: 1.25rem;
    color: #3b82f6;
    text-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    letter-spacing: 0.5px;
}

[data-theme="dark"] .td-symbol {
    color: #60a5fa;
}

.td-risk,
.td-rr,
.td-timeframe,
.td-session,
.td-setup,
.td-date,
.td-time {
    font-weight: 700;
    color: #475569;
    font-size: 1rem;
}

[data-theme="dark"] .td-risk,
[data-theme="dark"] .td-rr,
[data-theme="dark"] .td-timeframe,
[data-theme="dark"] .td-session,
[data-theme="dark"] .td-setup,
[data-theme="dark"] .td-date,
[data-theme="dark"] .td-time {
    color: #cbd5e1;
}

.td-emotion {
    font-size: 0.9375rem;
    color: #64748b;
    font-weight: 600;
}

[data-theme="dark"] .td-emotion {
    color: #94a3b8;
}

/* ========== ACTION BUTTONS ========== */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

/* ========== TAGS WITH ANIMATION ========== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.125rem;
    border-radius: 1rem;
    font-size: 0.9375rem;
    font-weight: 900;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: left 0.6s ease;
}

.tag:hover::before {
    left: 100%;
}

.tag:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.tag-buy {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: 3px solid #34d399;
}

.tag-sell {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: 3px solid #f87171;
}

.tag-tp {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: 3px solid #34d399;
    animation: pulse-success 2.5s ease-in-out infinite;
}

.tag-sl {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: 3px solid #f87171;
}

.tag-be {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: 3px solid #fbbf24;
}

@keyframes pulse-success {
    0%, 100% {
        box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 8px 28px rgba(16, 185, 129, 0.7);
    }
}

[data-theme="dark"] .tag-buy {
    background: linear-gradient(135deg, #059669, #047857);
    border-color: #10b981;
}

[data-theme="dark"] .tag-sell {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-color: #ef4444;
}

[data-theme="dark"] .tag-tp {
    background: linear-gradient(135deg, #059669, #047857);
    border-color: #10b981;
}

[data-theme="dark"] .tag-sl {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-color: #ef4444;
}

[data-theme="dark"] .tag-be {
    background: linear-gradient(135deg, #d97706, #b45309);
    border-color: #f59e0b;
}

/* ========== QUALITY BADGE ========== */
.quality-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-radius: 1rem;
    font-weight: 900;
    font-size: 0.9375rem;
    border: 3px solid #60a5fa;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.quality-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.quality-badge:hover::before {
    left: 100%;
}

.quality-badge:hover {
    transform: scale(1.15) rotate(-3deg);
    box-shadow: 0 10px 28px rgba(59, 130, 246, 0.6);
}

[data-theme="dark"] .quality-badge {
    background: linear-gradient(135deg, #1e40af, #7c3aed);
    border-color: #3b82f6;
}

/* ========== BUTTON ICONS ========== */
.btn-icon {
    padding: 0.75rem 0.875rem;
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 1rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-icon:hover::before {
    width: 250%;
    height: 250%;
}

.btn-icon:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.btn-icon:active {
    transform: translateY(-2px) scale(1.02);
}

.btn-icon-view:hover {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #3b82f6;
    border-color: #3b82f6;
}

.btn-icon-edit:hover {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #16a34a;
    border-color: #16a34a;
}

.btn-icon-danger:hover {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
    border-color: #dc2626;
}

/* ========== CHART & IMAGE BUTTONS ========== */
.btn-icon-link {
    padding: 0.75rem 0.875rem;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 3px solid #93c5fd;
    border-radius: 1rem;
    color: #3b82f6;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-icon-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-icon-link:hover::before {
    width: 250%;
    height: 250%;
}

.btn-icon-link:hover {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.5);
    border-color: #3b82f6;
}

.btn-icon-link:active {
    transform: translateY(-2px) scale(1.02);
}

/* ========== DARK MODE ========== */
[data-theme="dark"] .btn-icon {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}

[data-theme="dark"] .btn-icon-view:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.35));
    color: #60a5fa;
    border-color: #60a5fa;
}

[data-theme="dark"] .btn-icon-edit:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.35));
    color: #4ade80;
    border-color: #4ade80;
}

[data-theme="dark"] .btn-icon-danger:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.25), rgba(220, 38, 38, 0.35));
    color: #f87171;
    border-color: #f87171;
}

[data-theme="dark"] .btn-icon-link {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.35));
    border-color: rgba(147, 197, 253, 0.4);
    color: #60a5fa;
}

[data-theme="dark"] .btn-icon-link:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(59, 130, 246, 0.45));
    border-color: #60a5fa;
}

/* ========== DETAIL MODAL ========== */
.detail-section {
    padding: 1.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 1.25rem;
    border: 3px solid #e2e8f0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.detail-section:hover {
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

[data-theme="dark"] .detail-section {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
}

.detail-section-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

[data-theme="dark"] .detail-section-title {
    color: #f1f5f9;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.detail-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .detail-label {
    color: #94a3b8;
}

.detail-value {
    font-size: 1.0625rem;
    color: #1e293b;
    font-weight: 900;
}

[data-theme="dark"] .detail-value {
    color: #f1f5f9;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1280px) {
    .journal-table {
        font-size: 0.875rem;
    }
    
    .journal-table th,
    .journal-table td {
        padding: 1.25rem 1.5rem;
    }
}

@media (max-width: 1024px) {
    .journal-table {
        font-size: 0.8125rem;
    }
    
    .journal-table th,
    .journal-table td {
        padding: 1rem 1.25rem;
    }
    
    .tag {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .quality-badge {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .table-container {
        border-radius: 1.25rem;
    }
    
    .journal-table th,
    .journal-table td {
        padding: 0.875rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .tag {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .quality-badge {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .btn-icon,
    .btn-icon-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .action-buttons {
        gap: 0.5rem;
    }
}

/* Setup Screen Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 35px rgba(139, 92, 246, 0.5);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive Setup Screens */
@media (max-width: 768px) {
    #setupScreen .glass-card,
    #profileManager .glass-card {
        margin: 1rem;
        padding: 1.5rem 1rem;
    }
    
    #setupScreen h2 {
        font-size: 2rem !important;
    }
    
    #setupScreen p {
        font-size: 0.9rem !important;
    }
    
    #setupScreen .btn-primary,
    #profileManager .btn-primary {
        padding: 0.875rem 2rem !important;
        font-size: 1rem !important;
    }
    
    /* Steps Indicator */
    #setupScreen > div > div > div:nth-child(4),
    #profileManager > div > div:nth-child(2) {
        flex-direction: column;
        gap: 0.75rem !important;
    }
    
    #setupScreen > div > div > div:nth-child(4) > div,
    #profileManager > div > div:nth-child(2) > div {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #setupScreen .glass-card,
    #profileManager .glass-card {
        margin: 0.5rem;
        padding: 1.25rem 0.75rem;
    }
    
    #setupScreen h2 {
        font-size: 1.75rem !important;
    }
    
    #setupScreen .btn-primary,
    #profileManager .btn-primary {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9375rem !important;
    }
}

/* Dark Mode for Setup Screens */
[data-theme="dark"] #setupScreen .glass-card,
[data-theme="dark"] #profileManager .glass-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
}

[data-theme="dark"] #setupScreen h2,
[data-theme="dark"] #profileManager h2 {
    background: linear-gradient(135deg, #60a5fa, #a78bfa) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

[data-theme="dark"] #setupScreen p,
[data-theme="dark"] #profileManager p {
    color: #cbd5e1 !important;
}

[data-theme="dark"] #setupScreen .text-gray-500,
[data-theme="dark"] #profileManager .text-gray-500 {
    color: #94a3b8 !important;
}

[data-theme="dark"] #setupScreen .text-gray-600,
[data-theme="dark"] #profileManager .text-gray-600 {
    color: #cbd5e1 !important;
}

[data-theme="dark"] #setupScreen .text-gray-700,
[data-theme="dark"] #profileManager .text-gray-700 {
    color: #e2e8f0 !important;
}
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px);
    }
}

/* Calendar Type Button */
#calendarTypeBtn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#calendarTypeBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

#calendarTypeBtn:hover::before {
    left: 100%;
}

#calendarTypeBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#calendarTypeBtn:active {
    transform: translateY(0);
}

/* Date and Time Input Enhancements */
#tradeDate,
#tradeTime {
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
    background: white;
    position: relative;
}

#tradeDate {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    padding-left: 2.5rem;
}

#tradeDate:hover,
#tradeTime:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#tradeDate:focus,
#tradeTime:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    outline: none;
}

[data-theme="dark"] #tradeDate,
[data-theme="dark"] #tradeTime {
    border-color: #334155;
    background: #1e293b;
    color: #f1f5f9;
}

[data-theme="dark"] #tradeDate {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
}

[data-theme="dark"] #tradeDate:hover,
[data-theme="dark"] #tradeTime:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] #tradeDate:focus,
[data-theme="dark"] #tradeTime:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
}

/* Live System Time Badge */
[data-theme="dark"] .flex.items-center.gap-1.px-3 {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: #93c5fd !important;
}
