@import url('https://fonts.googleapis.com/css2?family=Play:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Text Selection Styling */
::selection {
    background: var(--primary);
    color: var(--bg-primary);
}

::-moz-selection {
    background: var(--primary);
    color: var(--bg-primary);
}

:root {
    /* Modern Monochromatic Sage Green Palette */
    --primary: #31473A;           /* Primary Action Green - Deepest shade for CTAs, active states */
    --primary-dark: #253426;      /* Even darker for hover states */
    --primary-light: #4A5F4E;     /* Lighter primary for subtle variations */
    --secondary: #7C8363;         /* Neutral Base Green - Core brand color, headers */
    --success: #7C8363;           /* Success messages - uses neutral base */
    --warning: #D4A574;           /* Warm sage-compatible warning (muted amber) */
    --danger: #A65858;            /* Muted red for errors (sage-compatible) */
    --accent: #A8B39B;            /* Highlight Green - Subtle accent for focus states */
    --bg-primary: #EDF4F2;        /* Light Background Green - Off-white with green undertone */
    --bg-secondary: #E1EBE8;      /* Slightly darker background for sections */
    --bg-tertiary: #D6E3DF;       /* Even darker for cards/tables */
    --border: #E5E7EB;            /* System Neutral - Dividers and borders */
    --text-primary: #1F2937;      /* Near-black charcoal - Main text */
    --text-secondary: #6B7280;    /* Medium grey for secondary text */
    --shadow-sm: 0 1px 2px 0 rgba(49, 71, 58, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(49, 71, 58, 0.12);
    --shadow-lg: 0 10px 15px -3px rgba(49, 71, 58, 0.15);
}

body {
    font-family: 'Play', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--bg-primary);
    padding: 32px 0;
    box-shadow: var(--shadow-md);
}

header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 4px;
}

header h1 .logo-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
    cursor: pointer;
}

header h1 .logo-link:hover {
    opacity: 0.8;
}

header .subtitle {
    font-size: 14px;
    opacity: 0.9;
}

/* Tabs */
.tabs {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.tabs .container {
    display: flex;
    gap: 8px;
}

.tab-btn {
    padding: 16px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--primary);
    background: var(--bg-tertiary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Search Box */
.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(24, 74, 59, 0.1);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Icon Buttons */
.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg-secondary);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-icon-danger:hover {
    background: rgba(166, 88, 88, 0.1);
}

.btn-icon-danger svg {
    stroke: var(--danger);
}

/* Table */
.table-container {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-tertiary);
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

tbody tr:hover {
    background: var(--bg-secondary);
}

tbody tr:last-child td {
    border-bottom: none;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-draft {
    background: #D0E0DB;
    color: #184A3B;
}

.status-sent {
    background: #b8d5ce;
    color: #0f3228;
}

.status-accepted {
    background: #9cc4b8;
    color: #0f3228;
}

.status-rejected {
    background: #d9cfcf;
    color: #6b5050;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Forms */
form {
    padding: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    text-transform: capitalize;
}

/* Exceptions - no capitalize for email, password, url, number fields and textarea */
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input.no-capitalize,
.form-group textarea {
    text-transform: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Theme Selector */
.theme-option {
    cursor: pointer;
    user-select: none;
}

.theme-option .theme-preview {
    pointer-events: none;
}

.theme-option:hover .theme-preview {
    transform: scale(1.02);
}

.theme-option:active .theme-preview {
    transform: scale(0.98);
}

.form-group textarea {
    resize: vertical;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Quote Items */
#quoteItems {
    margin-bottom: 16px;
}

.quote-item {
    display: grid;
    grid-template-columns: 80px 100px 80px 100px auto;
    gap: 12px;
    margin-bottom: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.quote-item input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.quote-item input:focus,
.quote-item textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(49, 71, 58, 0.1);
}

.quote-item textarea {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.quote-item .remove-item-btn {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.quote-item .remove-item-btn:hover {
    background: #dc2626;
}

/* Quote Summary */
.quote-summary {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
    margin: 24px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 600;
    padding-top: 12px;
    border-top: 2px solid var(--border);
    color: var(--primary);
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-info {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary-dark);
}

.alert-info a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
}

.alert-info a:hover {
    color: white;
    text-decoration: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.dashboard-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.card-content {
    flex: 1;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.card-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.dashboard-section {
    margin-top: 32px;
}

.dashboard-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* Signature Section */
.quote-view-content {
    padding: 24px;
}

.signature-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
}

.signature-section h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.signature-instructions {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 14px;
}

#signatureCanvas {
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: crosshair;
    display: block;
    width: 100%;
    max-width: 600px;
    height: 150px;
    background: white;
}

.signature-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

.quote-details {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.quote-details h3 {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 16px;
}

.quote-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 8px 0;
}

.quote-info-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.quote-items-table {
    margin: 24px 0;
}

.quote-items-table table {
    width: 100%;
}

.signature-display {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.signature-display img {
    max-width: 300px;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 4px;
}

/* Minimal SVG Icons */
.icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: middle;
}

.icon-edit {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-delete {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-view {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-send {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Form Validation & Accessibility */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown),
select:valid:not(:placeholder-shown) {
    border-color: var(--success);
}

.form-group label {
    font-weight: 500;
    margin-bottom: 6px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(24, 74, 59, 0.1);
}

.form-helper {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.form-error {
    font-size: 13px;
    color: var(--danger);
    margin-top: 4px;
    display: none;
}

input:invalid:not(:placeholder-shown) ~ .form-error {
    display: block;
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    color: white;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Better Focus States */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    background-color: var(--primary-dark);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 6px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
    white-space: nowrap;
    pointer-events: none;
}

.tooltip:hover .tooltip-text,
.tooltip:focus .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Improved Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
    stroke: var(--text-secondary);
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* Table Improvements */
table tbody tr {
    transition: background-color 0.15s;
}

table tbody tr:hover {
    background-color: var(--bg-secondary);
}

th {
    user-select: none;
}

th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 24px;
}

th.sortable:hover {
    background-color: var(--bg-secondary);
}

th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 8px;
    opacity: 0.3;
    font-size: 12px;
}

th.sortable.asc::after {
    content: '↑';
    opacity: 1;
}

th.sortable.desc::after {
    content: '↓';
    opacity: 1;
}

/* Alert Variants */
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Status Badge Hover */
.status-badge {
    transition: transform 0.15s;
}

.status-badge:hover {
    transform: scale(1.05);
}

/* Better Button States */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Improved Modal Animations */
.modal {
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved Dashboard Cards */
.dashboard-card {
    cursor: pointer;
}

.dashboard-card:active {
    transform: translateY(0);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced Header Buttons */
.header-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.profile-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.15));
}

.logout-btn {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.3);
}

.logout-btn:hover {
    background: rgba(231, 76, 60, 0.25);
    border-color: rgba(231, 76, 60, 0.4);
}

.header-btn svg {
    transition: transform 0.3s ease;
}

.header-btn:hover svg {
    transform: scale(1.1);
}

.logout-btn:hover svg {
    transform: translateX(3px);
}

/* User Greeting */
.user-greeting {
    padding: 8px 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .quote-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .quote-items-header {
        display: none !important;
    }

    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }

    .tabs .container {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 12px 16px;
        font-size: 14px;
        white-space: nowrap;
    }

    header h1 {
        font-size: 24px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .card-value {
        font-size: 28px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    header {
        padding: 20px 0;
    }

    .section-header h2 {
        font-size: 20px;
    }

    table {
        font-size: 14px;
    }

    .quote-item input {
        font-size: 13px;
    }
}

/* Bank Account Items */
.bank-account-item {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    align-items: start;
}

.bank-account-item input,
.bank-account-item select {
    margin-bottom: 0 !important;
}

.bank-account-item .remove-bank-btn {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 10px 12px;
    font-size: 16px;
    transition: all 0.2s;
    height: 42px;
    margin-top: 28px;
    align-self: start;
}

.bank-account-item .remove-bank-btn:hover {
    background: #dc2626;
}

/* Social Link Items */
.social-link-item {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    align-items: start;
}

.social-link-item select,
.social-link-item input {
    margin-bottom: 0 !important;
}

.social-link-item .remove-social-btn {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 10px 12px;
    font-size: 16px;
    transition: all 0.2s;
    height: 42px;
    margin-top: 28px;
    align-self: start;
}

.social-link-item .remove-social-btn:hover {
    background: #dc2626;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-menu-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Mobile Navigation */
.tabs.mobile-open {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 9999;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.tabs.mobile-open .container {
    flex-direction: column;
    padding: 20px;
}

.tabs.mobile-open .tab-btn {
    width: 100%;
    text-align: left;
    padding: 16px;
    margin: 4px 0;
    border-radius: 8px;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

.mobile-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block !important;
    }

    .subtitle {
        display: none;
    }

    .user-greeting {
        display: none !important;
    }

    .header-actions .btn-text {
        display: none;
    }

    .header-actions .btn {
        padding: 8px;
    }

    .header-btn svg {
        width: 20px !important;
        height: 20px !important;
    }

    .tabs {
        display: none;
    }

    /* Dashboard 2 columns on mobile */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .dashboard-card {
        padding: 16px 12px;
    }

    .dashboard-card h3 {
        font-size: 16px;
    }

    .dashboard-card .stat {
        font-size: 24px;
    }
}

/* Notifications */
.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc2626;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
}

.notifications-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.btn-text-link:hover {
    text-decoration: underline;
}

.notifications-list {
    max-height: 380px;
    overflow-y: auto;
}

.notifications-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
    text-align: center;
}

.notifications-view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    transition: all 0.2s;
}

.notifications-view-all:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--bg-primary);
}

.notification-item.unread {
    background: #EEF2FF;
}

.notification-item.unread:hover {
    background: #E0E7FF;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.notification-time {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.notification-unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    margin-right: 8px;
}

.notifications-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.notifications-empty svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-secondary);
    opacity: 0.3;
    margin-bottom: 12px;
}

/* Blog Styles */
.blog-categories-section,
.blog-tags-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.category-item {
    transition: all 0.2s;
}

.category-item:hover {
    background: var(--bg-secondary) !important;
}

.tag-item {
    transition: all 0.2s;
    cursor: pointer;
}

.tag-item:hover {
    background: var(--bg-secondary) !important;
    transform: translateY(-2px);
}

.blog-category-checkbox {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.modal.active {
    display: flex;
}

.modal-content.large {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Quill Editor Styling */
.ql-toolbar {
    background: var(--bg-primary);
    border-radius: 8px 8px 0 0;
    border: 1px solid var(--border) !important;
}

.ql-container {
    border: 1px solid var(--border) !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px;
    font-size: 15px;
    font-family: 'Play', sans-serif;
}

.ql-editor {
    min-height: 300px;
}

.ql-editor.ql-blank::before {
    color: var(--text-secondary);
    font-style: normal;
}

/* Badge Styles */
.badge {
    transition: all 0.2s;
}

.badge:hover {
    transform: scale(1.05);
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-admin {
    background: #DBEAFE;
    color: #1E3A8A;
}

.badge-info {
    background: #E0E7FF;
    color: #4338CA;
}

/* Button Icons */
.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    color: var(--text-primary);
}

.btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.btn-icon-danger {
    color: var(--danger);
}

.btn-icon-danger:hover {
    background: rgba(166, 88, 88, 0.1);
    color: #dc2626;
}

.action-buttons {
    display: flex;
    gap: 4px;
}

/* Blog Featured Image Preview */
#blogFeaturedImagePreview {
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border);
}

/* Small Button */
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Blog Responsive */
@media (max-width: 768px) {
    .modal-content.large {
        max-width: 100%;
        margin: 10px;
    }

    .ql-editor {
        min-height: 200px;
    }

    .blog-categories-section,
    .blog-tags-section {
        margin-bottom: 20px;
    }

    #blogPostsTable th:nth-child(3),
    #blogPostsTable td:nth-child(3),
    #blogPostsTable th:nth-child(4),
    #blogPostsTable td:nth-child(4),
    #blogPostsTable th:nth-child(6),
    #blogPostsTable td:nth-child(6) {
        display: none;
    }
}
