/* assets/css/style.css - Pro Label Printer Studio Design System */

:root {
    --bg-main: #0c0f17;
    --bg-surface: #141926;
    --bg-surface-elevated: #1a2234;
    --bg-surface-hover: #222d45;
    
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-hover: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.28);
    
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.25);
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #27334d;
    --border-light: #334155;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--primary-glow);
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Auth Pages */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at 15% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 85% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 40%),
                var(--bg-main);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(79, 70, 229, 0.3);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-light);
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.brand-icon {
    font-size: 1.1rem;
}

.auth-header h1 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: var(--transition);
}

.input-wrapper input,
.input-wrapper select,
.form-control {
    width: 100%;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 0.92rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}

.input-wrapper .input-icon ~ input,
.input-wrapper .input-icon ~ select,
.input-wrapper .input-icon ~ .form-control,
.input-wrapper:has(.input-icon) input,
.input-wrapper:has(.input-icon) .form-control,
.form-control.has-icon,
input.has-icon {
    padding-left: 42px !important;
}

.input-wrapper input:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: #1e273c;
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
    color: var(--primary-light);
}

.btn-toggle-pwd {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-toggle-pwd:hover {
    color: var(--text-primary);
}

.demo-credentials-badge {
    background: rgba(6, 182, 212, 0.08);
    border: 1px dashed rgba(6, 182, 212, 0.35);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 22px;
    font-size: 0.84rem;
}

.demo-credentials-badge .badge-title {
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.demo-credentials-badge .badge-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    margin-top: 3px;
}

.demo-credentials-badge .badge-row strong {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-danger {
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #86efac;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-light);
    color: #ffffff;
}

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

.btn-success:hover {
    filter: brightness(1.1);
}

.btn-danger {
    background: var(--danger-bg);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 22px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
}

.auth-footer {
    margin-top: 26px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* App Header & Navbar */
.app-header {
    background: rgba(20, 25, 38, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-badge {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.logo-text h1 {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.logo-text span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.user-profile-badge:hover {
    background: var(--bg-surface-hover);
    border-color: var(--primary-light);
    box-shadow: 0 0 10px var(--primary-glow);
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-store {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.header-desktop-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-mobile-actions {
    display: none;
    align-items: center;
    gap: 8px;
}

.mobile-menu-toggle {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:active {
    background: var(--bg-surface-hover);
    border-color: var(--primary-light);
    color: var(--primary-light);
    box-shadow: 0 0 12px var(--primary-glow);
}

.btn-mobile-new {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    padding: 7px 12px;
    font-size: 0.82rem;
}

/* Mobile Navigation Drawer & Backdrop */
.mobile-nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 8, 14, 0.75);
    backdrop-filter: blur(6px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 86vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.65);
    overflow: hidden;
}

.mobile-nav-drawer.active {
    transform: translateX(0);
}

.mobile-drawer-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(20, 25, 38, 0.95);
}

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

.mobile-drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.mobile-drawer-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.4);
}

.mobile-drawer-body {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
}

.drawer-user-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.drawer-user-card:hover {
    border-color: var(--primary-light);
    background: var(--bg-surface-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.15);
}

.drawer-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px var(--primary-glow);
}

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

.drawer-user-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-user-store {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
}

.drawer-user-edit-hint {
    font-size: 0.72rem;
    color: var(--accent);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.drawer-nav-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 2px;
    padding-left: 4px;
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
}

.drawer-nav-item:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-light);
    transform: translateX(2px);
}

.drawer-nav-primary {
    background: rgba(79, 70, 229, 0.15);
    border-color: rgba(79, 70, 229, 0.35);
    color: #e0e7ff;
}

.drawer-nav-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.drawer-nav-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    color: var(--accent);
}

.drawer-nav-primary .drawer-nav-icon {
    background: var(--primary);
    color: #fff;
}

.drawer-nav-label {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.drawer-nav-label span {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.drawer-nav-label small {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.drawer-chevron {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.drawer-stats-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    margin-top: auto;
}

.drawer-stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.drawer-stat-pill i {
    font-size: 0.9rem;
    color: var(--accent);
}

.drawer-stat-pill.success i { color: var(--success); }
.drawer-stat-pill.warning i { color: var(--warning); }

.mobile-drawer-footer {
    padding: 16px 18px;
    border-top: 1px solid var(--border-color);
    background: rgba(20, 25, 38, 0.95);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-footer-text {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
}

/* App Main Container */
.main-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
}

/* Stats Overview Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.primary { background: rgba(79, 70, 229, 0.15); color: var(--primary-light); }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-icon.warning { background: var(--warning-bg); color: var(--warning); }
.stat-icon.accent  { background: var(--accent-glow); color: var(--accent); }

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

.stat-info .stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

/* Section Controls & Toolbar */
.section-toolbar {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1;
}

.search-box {
    position: relative;
    min-width: 280px;
    flex: 1;
    max-width: 420px;
}

.search-box input {
    width: 100%;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px 10px 38px;
    font-size: 0.88rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.filter-select {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 0.88rem;
    color: var(--text-primary);
    cursor: pointer;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selection-bar {
    background: rgba(79, 70, 229, 0.12);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.selection-count {
    font-weight: 700;
    color: var(--primary-light);
}

/* Labels Table Card */
.table-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.data-table th {
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(34, 45, 69, 0.5);
}

.data-table tbody tr.row-selected {
    background: rgba(79, 70, 229, 0.08);
}

/* Product Info Cell */
.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-avatar {
    width: 40px;
    height: 40px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.product-meta h4 {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.product-meta span {
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-outline {
    border: 1px solid var(--border-color);
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
}

.badge-net-weight {
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #67e8f9;
    font-weight: 700;
}

.badge-mrp {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.badge-usp {
    color: var(--text-secondary);
    font-size: 0.75rem;
    display: block;
    margin-top: 3px;
}

.badge-expiring {
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.badge-expired {
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.badge-active {
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #86efac;
}

.badge-urgent-alert {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    font-weight: 800;
    animation: pulseAlert 2s infinite ease-in-out;
}

@keyframes pulseAlert {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
    }
}

.mono-batch {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    background: var(--bg-surface-elevated);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    color: #cbd5e1;
    display: inline-block;
}

/* Copies Counter in Table Row */
.copies-control {
    display: inline-flex;
    align-items: center;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.copies-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: var(--transition);
}

.copies-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.copies-input {
    width: 44px;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.86rem;
    -moz-appearance: textfield;
}

.copies-input::-webkit-outer-spin-button,
.copies-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Action Buttons Group */
.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Modal Dialogs */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 8, 14, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 980px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: scale(0.96);
    transition: var(--transition);
    overflow: hidden;
}

.modal-backdrop.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title-group h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-title-group p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.modal-close-btn {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.4);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(20, 25, 38, 0.6);
}

/* Paper Templates Management Modal & Cards */
.paper-modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    flex-wrap: wrap;
}

.paper-count-badge {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
}

.paper-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.paper-template-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    transition: var(--transition);
}

.paper-template-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.paper-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.paper-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

.paper-card-body {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.paper-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

/* Two-column layout in Add/Edit Label Modal */
.label-modal-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
}

@media (max-width: 860px) {
    .label-modal-grid {
        grid-template-columns: 1fr;
    }
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.field-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* Live Sticker Preview Box in Modal */
.preview-panel {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
}

/* Pure Physical-Look Sticker Card */
.sticker-preview-box {
    background: #ffffff;
    color: #000000;
    border-radius: 4px;
    padding: 12px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid #d1d5db;
    width: 100%;
    max-width: 320px;
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
    user-select: none;
    transition: transform 0.2s ease;
}

.sticker-header {
    text-align: center;
    border-bottom: 1.5px solid #000000;
    padding-bottom: 4px;
    margin-bottom: 6px;
}

.sticker-brand {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sticker-product-title {
    font-size: 1.05rem;
    font-weight: 900;
    margin-top: 2px;
    line-height: 1.15;
}

.sticker-grid-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    padding: 2px 0;
    border-bottom: 0.5px dashed #9ca3af;
}

.sticker-grid-row:last-of-type {
    border-bottom: none;
}

.sticker-label-key {
    font-weight: 700;
    color: #1f2937;
}

.sticker-label-val {
    font-weight: 600;
    color: #000000;
    text-align: right;
}

.sticker-label-val b,
.sticker-label-val strong {
    font-weight: 900 !important;
}

.sticker-label-val i,
.sticker-label-val em {
    font-style: italic !important;
}

.sticker-label-val u {
    text-decoration: underline !important;
}


.sticker-mrp-val {
    font-size: 0.95rem;
    font-weight: 900;
}

.sticker-barcode-area {
    margin-top: 8px;
    text-align: center;
    border-top: 1.5px solid #000;
    padding-top: 6px;
}

.sticker-barcode-svg {
    max-width: 100%;
    height: 38px;
}

.sticker-fssai-foot {
    font-size: 0.65rem;
    font-weight: 700;
    text-align: center;
    margin-top: 4px;
    color: #374151;
}

/* Quick weight chips */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.chip-btn {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.74rem;
    cursor: pointer;
    transition: var(--transition);
}

.chip-btn:hover {
    background: var(--primary-glow);
    border-color: var(--primary-light);
    color: var(--text-primary);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    font-size: 0.88rem;
    animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =========================================================================
   COMPREHENSIVE RESPONSIVE DESIGN SYSTEM
   Mobile First & Progressive Adaptation for Tablets and Phones
   ========================================================================= */

/* Tablets & Small Laptops (<= 1024px) */
@media (max-width: 1024px) {
    .header-container {
        padding: 12px 20px;
    }

    .main-wrapper {
        padding: 20px 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .modal-container {
        max-width: 90vw;
    }
}

/* Tablets Portrait & Large Smartphones (<= 820px) */
@media (max-width: 820px) {
    /* Header adaptations */
    .app-header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: rgba(20, 25, 38, 0.95);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    .header-container {
        padding: 10px 14px;
        gap: 10px;
    }

    .header-desktop-actions {
        display: none !important;
    }

    .header-mobile-actions {
        display: flex !important;
    }

    .logo-badge {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .logo-text h1 {
        font-size: 1.05rem;
    }

    .logo-text span {
        font-size: 0.68rem;
    }

    /* Main Workspace */
    .main-wrapper {
        padding: 14px 10px;
    }

    /* Stats Cards */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 16px;
    }

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

    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .stat-info .stat-value {
        font-size: 1.35rem;
    }

    .stat-info .stat-label {
        font-size: 0.72rem;
    }

    /* Search & Filter Toolbar */
    .section-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 12px;
        margin-bottom: 16px;
    }

    .toolbar-left {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 10px;
    }

    .search-box {
        max-width: 100%;
        width: 100%;
        min-width: 0;
    }

    .filter-select {
        width: 100%;
    }

    .toolbar-right {
        width: 100%;
    }

    .selection-bar {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 8px;
        padding: 10px 12px;
    }

    .selection-bar .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    /* Transform Table into Responsive Native-Feel Cards on Mobile */
    .table-card {
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
    }

    .table-responsive {
        overflow-x: visible;
    }

    .data-table {
        display: block;
        width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .data-table tbody tr {
        display: flex;
        flex-direction: column;
        gap: 9px;
        width: 100%;
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        padding: 14px 14px 12px 14px;
        position: relative;
        box-shadow: var(--shadow-sm);
        transition: var(--transition);
    }

    .data-table tbody tr.row-selected {
        background: rgba(79, 70, 229, 0.1);
        border-color: var(--primary-light);
        box-shadow: 0 0 12px var(--primary-glow);
    }

    .data-table tbody tr:hover {
        background: var(--bg-surface-elevated);
        border-color: var(--border-light);
    }

    .data-table tbody tr.empty-row,
    #noResultsRow {
        display: block !important;
        background: var(--bg-surface);
        border: 1px dashed var(--border-color);
        border-radius: var(--radius-lg);
        text-align: center;
        padding: 30px 16px;
    }

    .data-table tbody tr.empty-row td,
    #noResultsRow td {
        display: block;
        width: 100%;
        border: none;
        padding: 0;
    }

    /* Table Cell Specific Mobile Styles */
    .td-select {
        position: absolute;
        top: 14px;
        right: 14px;
        padding: 0 !important;
        border: none !important;
        width: auto !important;
        z-index: 2;
    }

    .td-select .row-select-checkbox {
        width: 22px;
        height: 22px;
        accent-color: var(--primary);
        cursor: pointer;
    }

    .td-product {
        padding: 0 34px 10px 0 !important;
        border-bottom: 1px solid var(--border-color) !important;
        width: 100%;
    }

    .td-product .product-cell {
        gap: 10px;
    }

    .td-product .product-avatar {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .td-product .product-meta h4 {
        font-size: 0.96rem;
        font-weight: 700;
        color: var(--text-primary);
        line-height: 1.25;
    }

    .td-product .product-meta span {
        font-size: 0.74rem;
        color: var(--text-secondary);
        display: block;
        margin-top: 2px;
    }

    .td-weight,
    .td-price,
    .td-dates,
    .td-batch {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 2px 0 !important;
        border: none !important;
        width: 100%;
        font-size: 0.85rem;
    }

    .td-weight::before,
    .td-price::before,
    .td-dates::before,
    .td-batch::before {
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
    }

    .td-price {
        flex-wrap: wrap;
        gap: 6px;
    }

    .td-price .badge-usp {
        display: inline-block;
        margin-top: 0;
        margin-left: 4px;
        font-size: 0.74rem;
    }

    .td-dates {
        align-items: flex-start;
    }

    .td-dates .dates-meta {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        font-size: 0.78rem;
        font-weight: 600;
        line-height: 1.3;
    }

    .td-dates .dates-meta .date-val {
        color: var(--text-secondary);
    }

    .td-batch .mono-batch {
        font-size: 0.76rem;
        padding: 2px 6px;
    }

    .td-batch .barcode-subtext {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.7rem;
        color: var(--text-muted);
        text-align: right;
        margin-top: 2px;
    }

    .td-copies {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 0 0 0 !important;
        border-top: 1px dashed var(--border-color) !important;
        border-bottom: none !important;
        width: 100%;
    }

    .td-copies::before {
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .td-actions {
        display: block;
        padding: 10px 0 0 0 !important;
        border-top: 1px solid var(--border-color) !important;
        border-bottom: none !important;
        width: 100%;
        text-align: left !important;
    }

    .td-actions .table-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 6px;
    }

    .td-actions .table-actions .btn {
        flex: 1;
        padding: 10px 0;
        font-size: 0.95rem;
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
    }
}

/* Standard Mobile Phones (<= 640px) */
@media (max-width: 640px) {
    /* Form grids collapse to single column */
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-col-full {
        grid-column: span 1 !important;
    }

    /* Paper templates manager on mobile */
    .paper-templates-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .paper-modal-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

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

    /* Prevent mobile browser font zooming on inputs */
    .form-control,
    input[type="text"],
    input[type="number"],
    input[type="date"],
    input[type="password"],
    select {
        font-size: 16px !important;
        padding: 10px 12px;
    }

    /* Modals mobile overhaul */
    .modal-backdrop {
        padding: 8px;
        align-items: flex-end;
    }

    .modal-container {
        width: 100%;
        max-height: 94vh;
        max-height: 94dvh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        margin: 0;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .modal-header p {
        font-size: 0.76rem;
    }

    .modal-body {
        padding: 14px 16px;
    }

    .modal-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .modal-footer .btn {
        flex: 1;
        min-width: 100px;
        justify-content: center;
        padding: 10px 14px;
    }

    .label-modal-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .preview-panel {
        padding: 14px 10px;
        width: 100%;
    }

    .sticker-preview-box {
        max-width: 100%;
        margin: 0 auto;
    }

    /* Chips touch targets */
    .chip-group {
        gap: 6px;
        margin-top: 8px;
    }

    .chip-btn {
        padding: 6px 10px;
        font-size: 0.78rem;
        min-height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Auth Page on Mobile */
    .auth-body {
        padding: 14px;
    }

    .auth-card {
        padding: 24px 18px;
        border-radius: var(--radius-lg);
    }

    .auth-header {
        margin-bottom: 22px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .auth-header p {
        font-size: 0.85rem;
    }

    .demo-credentials-badge {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    /* Toast on Mobile */
    .toast-container {
        bottom: 12px;
        right: 12px;
        left: 12px;
    }

    .toast {
        width: 100%;
        min-width: 0;
        font-size: 0.82rem;
    }
}

/* Small Smart Phones (<= 480px) */
@media (max-width: 480px) {
    .header-container {
        padding: 8px 10px;
    }

    .logo-text span {
        display: none;
    }

    .logo-badge {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }

    .logo-text h1 {
        font-size: 0.92rem;
    }

    .btn-mobile-new {
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    .mobile-menu-toggle {
        width: 34px;
        height: 34px;
        font-size: 1.05rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .stat-card {
        padding: 10px 10px;
        gap: 8px;
        border-radius: var(--radius-md);
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .stat-info .stat-value {
        font-size: 1.2rem;
    }

    .stat-info .stat-label {
        font-size: 0.65rem;
        line-height: 1.15;
    }

    .selection-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        text-align: center;
    }

    .selection-count {
        text-align: center;
        display: block;
    }

    .copies-control .copies-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .copies-control .copies-input {
        width: 48px;
        font-size: 0.92rem;
    }
}

/* Ultra Compact Screens (<= 360px) */
@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .btn-mobile-new span {
        display: none;
    }

    .mobile-nav-drawer {
        width: 290px;
        max-width: 90vw;
    }
}

/* ==========================================================================
   Summernote Lite Custom Dark Theme Integration
   ========================================================================== */
.note-editor.note-frame {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    background-color: var(--bg-surface-elevated) !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.note-editor.note-frame.focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px var(--primary-glow) !important;
}

.note-editor.note-frame .note-toolbar {
    background-color: var(--bg-surface) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 6px 8px !important;
    border-top-left-radius: var(--radius-md) !important;
    border-top-right-radius: var(--radius-md) !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.note-editor.note-frame .note-btn-group {
    margin-right: 4px !important;
    display: inline-flex;
    align-items: center;
}

.note-editor.note-frame .note-btn {
    background: var(--bg-surface-elevated) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 4px 8px !important;
    font-size: 0.78rem !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
}

.note-editor.note-frame .note-btn:hover,
.note-editor.note-frame .note-btn:focus,
.note-editor.note-frame .note-btn.active {
    background: var(--primary-glow) !important;
    color: var(--text-primary) !important;
    border-color: var(--primary-light) !important;
}

.note-editor.note-frame .note-editable {
    background-color: var(--bg-surface-elevated) !important;
    color: var(--text-primary) !important;
    min-height: 70px !important;
    font-family: inherit !important;
    font-size: 0.92rem !important;
    padding: 10px 12px !important;
    border-bottom-left-radius: var(--radius-md) !important;
    border-bottom-right-radius: var(--radius-md) !important;
}

.note-editor.note-frame .note-placeholder {
    color: var(--text-muted) !important;
    padding: 10px 12px !important;
    font-size: 0.88rem !important;
}

.note-editor.note-frame .note-statusbar {
    background-color: var(--bg-surface) !important;
    border-top: 1px solid var(--border-color) !important;
    border-bottom-left-radius: var(--radius-md) !important;
    border-bottom-right-radius: var(--radius-md) !important;
}

.note-editor.note-frame .note-statusbar .note-resizebar .note-icon-bar {
    border-top: 1px solid var(--border-light) !important;
}

/* Summernote dropdown menus & popups */
.note-dropdown-menu {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 6px !important;
    color: var(--text-primary) !important;
    z-index: 2100 !important;
    max-height: 240px !important;
    overflow-y: auto !important;
}

.note-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.note-dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

.note-dropdown-menu .note-dropdown-item,
.note-dropdown-menu a {
    color: var(--text-secondary) !important;
    padding: 6px 12px !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.82rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    transition: var(--transition) !important;
}

.note-dropdown-menu .note-dropdown-item:hover,
.note-dropdown-menu a:hover,
.note-dropdown-menu .note-dropdown-item.checked,
.note-dropdown-menu a.checked {
    background-color: var(--bg-surface-hover) !important;
    color: var(--text-primary) !important;
}

.note-current-fontsize {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-right: 4px !important;
}

.note-modal {
    z-index: 2200 !important;
}

.note-modal-content {
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
}

.note-modal-header {
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.note-modal-footer {
    border-top: 1px solid var(--border-color) !important;
}

/* Ensure paragraph tags inside labels/badges don't break line-height or inline flow */
.sticker-label-val p,
.ps-label-val p,
.weight-badge p,
#cardPrevWeight p {
    margin: 0 !important;
    display: inline !important;
}
