/* =====================================================
   M&B Fashion Mode - Admin Panel Stylesheet
   Theme: Rosa & Rose Gold — Modern Edition
   ===================================================== */

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #2d2d2d;
    --sidebar-hover: #3a3a3a;
    --sidebar-active: #4a3040;
    --accent: #e8a0b4;
    --accent-light: #f2c4d0;
    --accent-dark: #c97d94;
    --primary: #b76e84;
    --primary-light: #d4899e;
    --text-dark: #2d2d2d;
    --text-medium: #5a5a5a;
    --text-light: #999;
    --bg-body: #faf5f7;
    --bg-white: #ffffff;
    --border-color: #f0dce3;
    --success: #5cb885;
    --success-bg: #e3f5ec;
    --danger: #d9534f;
    --danger-bg: #fbe4e4;
    --warning: #f0ad4e;
    --warning-bg: #fdf3e1;
    --info: #7ba7c2;
    --info-bg: #e5f0f7;
    --secondary: #8e8e8e;
    --secondary-bg: #f0eff0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(180,100,130,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.04), 0 6px 20px rgba(180,100,130,0.10);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.06), 0 12px 40px rgba(180,100,130,0.14);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Animations === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInBottom {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.15); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-dark);
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* === Layout === */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #2d2d2d 0%, #252525 100%);
    color: #ccc;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255,255,255,0.04);
}

.sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.5px;
    box-shadow: 0 4px 12px rgba(232,160,180,0.35);
    transition: var(--transition);
}

.logo:hover .logo-icon {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 6px 20px rgba(232,160,180,0.5);
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 8px 14px;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255,255,255,0.25);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 12px 14px 6px;
    margin-top: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    color: rgba(255,255,255,0.55);
    border-radius: 10px;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
    position: relative;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(232,160,180,0.15) 0%, rgba(201,125,148,0.1) 100%);
    color: var(--accent);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
    border-radius: 0 4px 4px 0;
}

.nav-icon-wrap {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    transition: var(--transition);
    flex-shrink: 0;
}

.nav-item:hover .nav-icon-wrap {
    background: rgba(255,255,255,0.1);
    transform: scale(1.05);
}

.nav-item.active .nav-icon-wrap {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 2px 8px rgba(232,160,180,0.3);
}

.nav-item.active .nav-icon-wrap svg {
    stroke: #fff;
}

.nav-label {
    letter-spacing: 0.2px;
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 4px 14px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 18px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.12);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(232,160,180,0.25);
    letter-spacing: -0.3px;
}

.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 500;
}

.logout-link {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: rgba(255,255,255,0.4);
    transition: var(--transition);
    flex-shrink: 0;
}

.logout-link:hover {
    color: var(--danger);
    background: rgba(217,83,79,0.12);
    transform: none;
}

/* === Main Content === */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    overflow-x: hidden;
}

/* Top Bar */
.topbar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-medium);
    padding: 4px;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    flex: 1;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-greeting {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Content Area */
.content-area {
    padding: 28px;
    flex: 1;
    animation: fadeIn 0.4s ease;
    min-width: 0;
    overflow-x: hidden;
}

/* === Cards === */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: none;
    margin-bottom: 24px;
    transition: var(--transition);
    animation: fadeInUp 0.5s ease both;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: linear-gradient(135deg, #fff 0%, #fef8fa 100%);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: linear-gradient(135deg, #fef8fa 0%, #fff 100%);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* === Dashboard Stats === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    border: none;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition);
    animation: fadeInUp 0.5s ease both;
    cursor: default;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }
.stat-card:nth-child(6) { animation-delay: 0.3s; }
.stat-card:nth-child(7) { animation-delay: 0.35s; }

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(-3deg);
}

.stat-icon.blue { background: linear-gradient(135deg, #e8a0b4, #c97d94); }
.stat-icon.green { background: linear-gradient(135deg, #7ecba1, #5cb885); }
.stat-icon.gold { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); }
.stat-icon.red { background: linear-gradient(135deg, #e07b7b, #d9534f); }
.stat-icon.purple { background: linear-gradient(135deg, #c49ec5, #a77ba8); }
.stat-icon.teal { background: linear-gradient(135deg, #95c4d6, #7ba7c2); }

.stat-info h3 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

/* === Tables === */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background: linear-gradient(135deg, var(--bg-body) 0%, #f5edf0 100%);
    color: var(--text-medium);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(240,220,227,0.5);
    font-size: 0.9rem;
    vertical-align: middle;
    transition: background 0.2s ease;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:nth-child(even) {
    background: rgba(250,245,247,0.5);
}

tbody tr:hover {
    background: rgba(232,160,180,0.06);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* === Badges / Status === */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: #8a6d3b; }
.badge-info { background: var(--info-bg); color: #3d7a99; }
.badge-secondary { background: var(--secondary-bg); color: var(--secondary); }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-light);
    color: #fff;
    box-shadow: 0 4px 15px rgba(183,110,132,0.35);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    color: #fff;
    box-shadow: 0 4px 15px rgba(232,160,180,0.4);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #4da875;
    color: #fff;
    box-shadow: 0 4px 15px rgba(92,184,133,0.35);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #c9302c;
    color: #fff;
    box-shadow: 0 4px 15px rgba(217,83,79,0.35);
}

.btn-warning {
    background: #f0ad4e;
    color: #fff;
}

.btn-warning:hover {
    background: #e09a3a;
    color: #fff;
    box-shadow: 0 4px 15px rgba(240,173,78,0.35);
}

.btn-secondary {
    background: var(--secondary-bg);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #e4e3e4;
    color: var(--text-dark);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-medium);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(183,110,132,0.04);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 1rem;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* === Forms === */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-medium);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-group label .required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-family);
    color: var(--text-dark);
    background: #fefcfd;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 160, 180, 0.2);
    background: #fff;
}

.form-control::placeholder {
    color: var(--text-light);
}

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

select.form-control {
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0 24px;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* === Alerts === */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    animation: fadeInUp 0.3s ease;
    border-left: 4px solid;
    backdrop-filter: blur(4px);
}

.alert-success { background: var(--success-bg); color: #2d6a4f; border-left-color: var(--success); }
.alert-danger { background: var(--danger-bg); color: #8b3a3a; border-left-color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: #8a6d3b; border-left-color: var(--warning); }
.alert-info { background: var(--info-bg); color: #3d7a99; border-left-color: var(--info); }

.alert-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.5;
    color: inherit;
    padding: 0 4px;
    transition: var(--transition);
}

.alert-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* === Search / Filter Bar === */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar .form-control {
    max-width: 300px;
}

.search-input {
    position: relative;
}

.search-input input {
    padding-left: 36px;
}

.search-input::before {
    content: "?";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* === Pagination === */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-medium);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--bg-body);
    border-color: var(--accent);
    color: var(--accent-dark);
    transform: translateY(-1px);
}

.page-link.active {
    background: linear-gradient(135deg, var(--primary), var(--accent-dark));
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(183,110,132,0.3);
}

/* === Modal / Confirm Dialog === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(6px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 480px;
    padding: 28px;
    animation: slideInBottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.modal p {
    color: var(--text-medium);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* === Detail View / Info Grid === */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px 32px;
}

.info-item {
    padding: 8px 0;
}

.info-item .label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.info-item .value {
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* === Activity List === */
.activity-list {
    list-style: none;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(240,220,227,0.5);
    font-size: 0.88rem;
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: rgba(232,160,180,0.04);
    border-radius: var(--radius-sm);
    padding-left: 8px;
    padding-right: 8px;
}

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

.activity-time {
    color: var(--text-light);
    white-space: nowrap;
    font-size: 0.8rem;
    min-width: 110px;
}

.activity-text {
    color: var(--text-medium);
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-light);
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 16px;
}

/* === Login Page === */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2d2d2d 0%, #4a3040 25%, #c97d94 55%, #e8a0b4 75%, #f2c4d0 100%);
    background-size: 300% 300%;
    animation: gradientShift 12s ease infinite;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(232,160,180,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 30%, rgba(242,196,208,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    color: rgba(255,255,255,0.6);
    font-size: 0.82rem;
    animation: fadeInUp 0.8s ease 0.4s both;
    position: relative;
    z-index: 1;
}

.login-footer a {
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    transition: var(--transition);
}

.login-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.login-box {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 22px;
    box-shadow: 0 16px 60px rgba(0,0,0,0.15), 0 4px 20px rgba(180,100,130,0.15);
    width: 100%;
    max-width: 420px;
    padding: 44px 40px;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-icon {
    width: 68px;
    height: 68px;
    font-size: 1.4rem;
    margin: 0 auto 14px;
    box-shadow: 0 6px 24px rgba(232,160,180,0.4);
    border-radius: 16px;
}

.login-logo h1 {
    font-size: 1.6rem;
    color: var(--text-dark);
    font-weight: 800;
    letter-spacing: -0.3px;
}

.login-logo p {
    color: var(--accent-dark);
    font-size: 0.9rem;
    margin-top: 4px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.login-box .form-control {
    padding: 12px 16px;
    font-size: 1rem;
    background: rgba(255,255,255,0.7);
    border: 1.5px solid rgba(240,220,227,0.6);
}

.login-box .form-control:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(232, 160, 180, 0.15);
}

.login-box .btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border-radius: 12px;
    letter-spacing: 0.3px;
}

.login-box .btn-accent:hover {
    box-shadow: 0 6px 20px rgba(232,160,180,0.45);
    transform: translateY(-2px);
}

/* === App Footer (Credit) === */
.app-footer {
    text-align: center;
    padding: 20px 28px;
    color: var(--text-light);
    font-size: 0.82rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.heart {
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.app-footer .heart {
    color: var(--accent);
    font-size: 0.95rem;
}

.login-footer .heart {
    color: #f2c4d0;
    font-size: 0.95rem;
}

.app-footer a {
    color: var(--accent-dark);
    font-weight: 600;
    transition: var(--transition);
}

.app-footer a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* === Invoice Detail Items === */
.items-table {
    margin-top: 12px;
}

.items-table .add-row {
    margin-top: 12px;
}

/* === Import Status Cards === */
.import-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.import-status-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
    animation: fadeInUp 0.4s ease both;
}

.import-status-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.import-status-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.import-status-icon.connection-ok {
    background: var(--success-bg);
    color: var(--success);
}

.import-status-icon.connection-error {
    background: var(--danger-bg);
    color: var(--danger);
}

.import-status-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}

.import-status-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

html.dark-mode .import-status-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
}

html.dark-mode .import-status-value {
    color: var(--text-dark);
}

/* === Charts === */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.chart-card {
    min-width: 0;
    overflow: hidden;
}

.chart-card .card-body {
    padding: 16px 20px;
    overflow: hidden;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    min-width: 0;
}

.chart-container-sm {
    height: 260px;
}

/* === Responsive === */
/* === Sidebar Overlay (mobile) === */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* === Tablet (<= 1024px) === */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }

    .sidebar-toggle:active {
        background: rgba(232,160,180,0.1);
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* === Mobile (<= 768px) === */
@media (max-width: 768px) {
    .content-area {
        padding: 16px;
    }

    .topbar {
        padding: 0 12px;
        height: 56px;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .user-greeting {
        display: none;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .chart-container {
        height: 250px;
    }

    .import-status-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .card {
        border-radius: var(--radius-sm);
        margin-bottom: 16px;
    }

    .card-header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .card-header .btn,
    .card-header .btn-group {
        width: 100%;
    }

    .card-header .btn {
        justify-content: center;
    }

    .card-body {
        padding: 16px;
    }

    .card-footer {
        padding: 12px 16px;
        flex-direction: column;
    }

    .card-footer .btn {
        width: 100%;
        justify-content: center;
    }

    /* Tables: horizontal scroll + better mobile layout */
    .table-responsive {
        margin: 0 -16px;
        padding: 0 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    thead th {
        font-size: 0.72rem;
        padding: 10px 12px;
    }

    tbody td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Filter / Search */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar .form-control {
        max-width: 100%;
    }

    .filter-bar .btn {
        width: 100%;
        justify-content: center;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
        gap: 12px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .stat-info h3 {
        font-size: 1.3rem;
    }

    .stat-info p {
        font-size: 0.78rem;
    }

    /* Pagination */
    .pagination {
        gap: 3px;
    }

    .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    /* Badges */
    .badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    /* Buttons */
    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }

    /* Modal */
    .modal {
        width: 95%;
        padding: 20px;
        margin: 16px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Footer */
    .app-footer {
        padding: 16px;
        font-size: 0.78rem;
    }

    /* Login */
    .login-box {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .login-logo .logo-icon {
        width: 56px;
        height: 56px;
    }

    .login-logo h1 {
        font-size: 1.3rem;
    }

    /* Email Template List */
    .et-list-item {
        grid-template-columns: 42px 1fr;
        gap: 10px;
        padding: 12px 14px;
    }
    .et-list-date {
        display: none;
    }
    .et-list-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
    .et-list-meta {
        white-space: normal;
    }
}

/* === Small Mobile (<= 480px) === */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .content-area {
        padding: 12px;
    }

    .topbar {
        padding: 0 10px;
    }

    .page-title {
        font-size: 1rem;
    }

    .card-header h2 {
        font-size: 1rem;
    }

    /* Activity items */
    .activity-item {
        flex-direction: column;
        gap: 4px;
    }

    .activity-time {
        min-width: auto;
    }
}

/* === Print Styles === */
@media print {
    .sidebar, .topbar, .sidebar-toggle, .btn, .no-print, .app-footer {
        display: none !important;
    }

    .main-content {
        margin: 0;
    }

    .content-area {
        padding: 0;
    }

    .card {
        border: none;
        box-shadow: none;
    }

    body {
        background: #fff;
        font-size: 12pt;
    }
}

/* === Utility Classes === */

/* === Global Search === */
.global-search-wrapper {
    position: relative;
}

.global-search-input {
    width: 220px;
    padding: 7px 12px 7px 34px;
    font-size: 0.84rem;
    border-radius: 20px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    transition: width 0.3s ease, border-color 0.2s, box-shadow 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
}

.global-search-input:focus {
    width: 320px;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232,160,180,0.15);
    outline: none;
}

.global-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 340px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.global-search-results.active {
    display: block;
}

.search-group-label {
    padding: 10px 14px 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    font-weight: 600;
}

.search-result-item {
    padding: 8px 14px;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    transition: background 0.15s;
}

.search-result-item:hover,
.search-result-item.active {
    background: rgba(232,160,180,0.1);
}

.search-result-title {
    font-weight: 600;
    font-size: 0.88rem;
}

.search-result-subtitle {
    font-size: 0.78rem;
    color: var(--text-light);
}

.search-no-results {
    padding: 16px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* === Notes Timeline === */
.notes-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.note-item {
    padding: 12px 16px;
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}

.note-meta {
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.note-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-medium);
}

/* === Nav Sub Item (Mahnungen) === */
.nav-sub-item {
    padding-left: 48px !important;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .global-search-wrapper {
        display: none;
    }
}

/* === Quarter Summary === */
.quarter-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.quarter-box {
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.quarter-box:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.quarter-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.quarter-amount {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
}

/* === Top Customers === */
.top-customers-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.top-customer-item {
    display: grid;
    grid-template-columns: 28px 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(240,220,227,0.5);
}

.top-customer-item:last-child { border-bottom: none; }

.top-customer-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-customer-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.top-customer-bar-wrap {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.top-customer-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-customer-revenue {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
}

.top-customer-count {
    font-size: 0.8rem;
    white-space: nowrap;
}

/* === Email Template Editor === */
.template-vars-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.template-var-pill {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(123,167,194,0.12);
    color: #3d7a99;
    border-radius: 20px;
    font-size: 0.78rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: var(--transition);
    user-select: none;
}

.template-var-pill:hover {
    background: rgba(232,160,180,0.15);
    color: var(--primary);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.template-body-textarea {
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    min-height: 400px;
    resize: vertical;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* --- Formatting Toolbar --- */
.et-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: #f8f3f5;
    border: 1.5px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    flex-wrap: wrap;
}

.et-tb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--text-medium);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: Georgia, 'Times New Roman', serif;
    transition: var(--transition);
}
.et-tb-btn:hover {
    background: rgba(232,160,180,0.15);
    color: var(--primary);
}
.et-tb-btn:active {
    background: rgba(232,160,180,0.25);
    transform: scale(0.94);
}

.et-tb-sep {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 4px;
    flex-shrink: 0;
}

.et-tb-preview {
    width: auto !important;
    padding: 0 10px;
    gap: 5px;
    font-family: var(--font-family);
    font-size: 0.78rem;
    font-weight: 600;
    margin-left: auto;
}

/* --- Preview Pane --- */
.et-preview-pane {
    border: 1.5px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    min-height: 400px;
    background: #fff;
    overflow: auto;
}

/* --- Template List Items --- */
.et-list-item {
    display: grid;
    grid-template-columns: 48px 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}
.et-list-item:last-child {
    border-bottom: none;
}
.et-list-item:hover {
    background: rgba(232,160,180,0.04);
}

.et-list-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.et-list-info {
    min-width: 0;
}

.et-list-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-dark);
    margin-bottom: 3px;
    display: flex;
    align-items: center;
}

.et-list-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.et-list-date {
    font-size: 0.78rem;
    color: var(--text-light);
    white-space: nowrap;
    text-align: right;
}

.et-list-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* --- Netto/Brutto Toggle --- */
.price-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-medium);
}
.price-mode-toggle span {
    font-weight: 600;
}
.price-mode-btn {
    padding: 4px 12px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-medium);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.price-mode-btn:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}
.price-mode-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

@media (max-width: 768px) {
    .quarter-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === Dark Mode Toggle === */
.dark-mode-toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    transition: var(--transition);
    flex-shrink: 0;
}

.dark-mode-toggle:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: rgba(232,160,180,0.06);
    transform: scale(1.05);
}

.dark-mode-toggle .icon-moon { display: none; }
.dark-mode-toggle .icon-sun { display: block; }

html.dark-mode .dark-mode-toggle .icon-moon { display: block; }
html.dark-mode .dark-mode-toggle .icon-sun { display: none; }

/* === Dark Mode Theme === */
html.dark-mode {
    --bg-body: #1a1618;
    --bg-white: #262023;
    --text-dark: #e8e4e6;
    --text-medium: #b0a5aa;
    --text-light: #7a6e73;
    --border-color: #3a3035;
    --success-bg: rgba(92,184,133,0.12);
    --danger-bg: rgba(217,83,79,0.12);
    --warning-bg: rgba(240,173,78,0.12);
    --info-bg: rgba(123,167,194,0.12);
    --secondary-bg: #2d2529;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(80,40,55,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.2), 0 6px 20px rgba(80,40,55,0.12);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.25), 0 12px 40px rgba(80,40,55,0.15);
}

html.dark-mode body {
    background: var(--bg-body);
    color: var(--text-dark);
}

html.dark-mode a {
    color: var(--accent);
}

html.dark-mode a:hover {
    color: var(--accent-light);
}

html.dark-mode .topbar {
    background: rgba(38,32,35,0.9);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--border-color);
}

html.dark-mode .page-title {
    color: var(--text-dark);
}

html.dark-mode .card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
}

html.dark-mode .card-header {
    background: linear-gradient(135deg, #262023 0%, #2d2528 100%);
    border-bottom-color: var(--border-color);
}

html.dark-mode .card-header h2 {
    color: var(--text-dark);
}

html.dark-mode .card-footer {
    background: linear-gradient(135deg, #2d2528 0%, #262023 100%);
    border-top-color: var(--border-color);
}

html.dark-mode .stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
}

html.dark-mode .stat-info h3 {
    color: var(--text-dark);
}

html.dark-mode thead th {
    background: linear-gradient(135deg, #221c1f 0%, #2a2225 100%);
    color: var(--text-medium);
    border-bottom-color: var(--border-color);
}

html.dark-mode tbody td {
    border-bottom-color: var(--border-color);
}

html.dark-mode tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.02);
}

html.dark-mode tbody tr:hover {
    background: rgba(232,160,180,0.06);
}

html.dark-mode .form-control {
    background: #2d2528;
    border-color: var(--border-color);
    color: var(--text-dark);
}

html.dark-mode .form-control:focus {
    background: #332c2f;
    border-color: var(--accent);
}

html.dark-mode .form-control::placeholder {
    color: var(--text-light);
}

html.dark-mode .btn-secondary {
    background: #2d2528;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

html.dark-mode .btn-secondary:hover {
    background: #3a3035;
}

html.dark-mode .btn-outline {
    border-color: var(--border-color);
    color: var(--text-medium);
}

html.dark-mode .btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(232,160,180,0.08);
}

html.dark-mode .page-link {
    border-color: var(--border-color);
    color: var(--text-medium);
}

html.dark-mode .page-link:hover {
    background: #2d2528;
    border-color: var(--accent);
}

html.dark-mode .alert {
    border-left-width: 4px;
}

html.dark-mode .alert-success { background: var(--success-bg); color: #7ecba1; }
html.dark-mode .alert-danger { background: var(--danger-bg); color: #e8a0a0; }
html.dark-mode .alert-warning { background: var(--warning-bg); color: #f0c078; }
html.dark-mode .alert-info { background: var(--info-bg); color: #95c4d6; }

html.dark-mode .badge-success { background: var(--success-bg); color: #7ecba1; }
html.dark-mode .badge-danger { background: var(--danger-bg); color: #e8a0a0; }
html.dark-mode .badge-warning { background: var(--warning-bg); color: #f0c078; }
html.dark-mode .badge-info { background: var(--info-bg); color: #95c4d6; }
html.dark-mode .badge-secondary { background: var(--secondary-bg); color: var(--text-medium); }

html.dark-mode .activity-item {
    border-bottom-color: var(--border-color);
}

html.dark-mode .app-footer {
    border-top-color: var(--border-color);
    color: var(--text-light);
}

html.dark-mode .app-footer a {
    color: var(--accent);
}

html.dark-mode .modal-overlay {
    background: rgba(0,0,0,0.6);
}

html.dark-mode .modal {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
}

html.dark-mode .modal h3 { color: var(--text-dark); }
html.dark-mode .modal p { color: var(--text-medium); }

html.dark-mode .btn-accent,
html.dark-mode .btn-accent:hover,
html.dark-mode .btn-primary,
html.dark-mode .btn-primary:hover,
html.dark-mode .btn-success,
html.dark-mode .btn-success:hover {
    color: #fff;
}

html.dark-mode .dark-mode-toggle {
    background: #2d2528;
    border-color: var(--border-color);
    color: var(--accent);
}

html.dark-mode .dark-mode-toggle:hover {
    background: #3a3035;
    border-color: var(--accent);
}

html.dark-mode .sidebar-overlay {
    background: rgba(0,0,0,0.6);
}

html.dark-mode .empty-state { color: var(--text-light); }
html.dark-mode .form-group label { color: var(--text-medium); }
html.dark-mode .form-actions { border-top-color: var(--border-color); }

html.dark-mode .global-search-input {
    background-color: var(--secondary-bg);
    border-color: var(--border-color);
    color: var(--text-dark);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237a6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}
html.dark-mode .global-search-results {
    background: var(--bg-white);
    border-color: var(--border-color);
}
html.dark-mode .search-result-item:hover,
html.dark-mode .search-result-item.active {
    background: rgba(232,160,180,0.08);
}
html.dark-mode .note-item {
    background: var(--secondary-bg);
}
html.dark-mode .info-item .label { color: var(--text-light); }
html.dark-mode .info-item .value { color: var(--text-dark); }
html.dark-mode .quarter-box { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }
html.dark-mode .top-customer-bar-wrap { background: rgba(255,255,255,0.08); }
html.dark-mode .top-customer-item { border-bottom-color: rgba(255,255,255,0.06); }
html.dark-mode .template-var-pill { background: rgba(123,167,194,0.15); color: #7ba7c2; }
html.dark-mode .template-var-pill:hover { background: rgba(232,160,180,0.15); color: var(--accent); }
html.dark-mode .et-toolbar { background: rgba(255,255,255,0.04); border-color: var(--border-color); }
html.dark-mode .et-tb-btn { color: var(--text-light); }
html.dark-mode .et-tb-btn:hover { background: rgba(232,160,180,0.12); color: var(--accent); }
html.dark-mode .et-tb-sep { background: var(--border-color); }
html.dark-mode .et-preview-pane { background: var(--bg-white); border-color: var(--border-color); }
html.dark-mode .et-list-item { border-bottom-color: var(--border-color); }
html.dark-mode .et-list-item:hover { background: rgba(232,160,180,0.06); }
html.dark-mode .et-list-name { color: var(--text-dark); }
html.dark-mode .et-list-meta { color: var(--text-light); }
html.dark-mode .et-list-date { color: var(--text-light); }
html.dark-mode .price-mode-btn { background: var(--secondary-bg); border-color: var(--border-color); color: var(--text-light); }
html.dark-mode .price-mode-btn:hover { border-color: var(--accent); color: var(--accent); }
html.dark-mode .price-mode-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

html.dark-mode ::-webkit-scrollbar-thumb { background: #3a3035; }
html.dark-mode ::-webkit-scrollbar-thumb:hover { background: var(--accent-dark); }

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: #8a6d3b; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.w-100 { width: 100%; }
