/* ========================================
   POSTERS INVENTORY — Design System
   ======================================== */

/* --- CSS Variables --- */
:root {
    --primary: #1a1a1a;
    --primary-hover: #2a2a2a;
    --accent: #DCB253;
    --accent-hover: #c49b3a;
    --accent-dark: #a07d2a;
    --accent-light: rgba(220, 178, 83, 0.1);
    --accent-rgb: 220, 178, 83;
    --bg-main: #d5d0ca;
    --bg-card: #ffffff;
    --bg-surface: #eae6e0;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --text-secondary: #666666;
    --border: #c8c2b8;
    --danger: #b70909;
    --danger-hover: #950707;
    --success: #a07d2a;
    --success-bg: rgba(220, 178, 83, 0.12);
    --focus-ring: rgba(220, 178, 83, 0.3);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(255, 255, 255, 0.85);

    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
}

/* --- Dark Mode --- */
body.dark-mode {
    --bg-main: #141414;
    --bg-card: #1e1e1e;
    --bg-surface: #2a2a2a;
    --text-main: #e8e4e0;
    --text-muted: #a0a0a0;
    --text-secondary: #b0b0b0;
    --border: #333333;
    --primary: #e8e4e0;
    --primary-hover: #d4d0cc;
    --accent: #e8c96a;
    --accent-hover: #DCB253;
    --accent-dark: #e8c96a;
    --accent-light: rgba(220, 178, 83, 0.1);
    --accent-rgb: 220, 178, 83;
    --danger: #d42020;
    --success: #e8c96a;
    --success-bg: rgba(220, 178, 83, 0.1);
    --focus-ring: rgba(232, 201, 106, 0.3);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.6);
    --glass-bg: rgba(30, 30, 30, 0.85);
}

/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   TOP NAVIGATION BAR
   ======================================== */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.top-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    white-space: nowrap;
}

.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 50%;
}

.top-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #1a1a1a;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all var(--transition);
    font-family: inherit;
    white-space: nowrap;
    text-shadow: none;
    box-shadow: 0 4px 12px rgba(220, 178, 83, 0.2);
}

.btn-primary svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 16px rgba(220, 178, 83, 0.35); 
    filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all var(--transition);
    font-family: inherit;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.btn-secondary svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-secondary:hover { background: var(--bg-surface); border-color: var(--accent); color: var(--accent); }

body.dark-mode .btn-secondary { background: transparent; }
body.dark-mode .btn-secondary:hover { background: #2a2a2a; }

.icon-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--bg-surface); color: var(--accent); border-color: var(--accent); }

body.dark-mode .icon-btn:hover { background: #2a2a2a; }

.block-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    font-size: 0.95rem;
}

/* ========================================
   PAGE CONTENT
   ======================================== */
.page-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

.page-hero {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.3rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

body.dark-mode .page-title {
    background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

/* ========================================
   STATS ROW
   ======================================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg { width: 22px; height: 22px; }
.stat-icon--blue { background: rgba(220,178,83,0.12); color: var(--accent); }
.stat-icon--green { background: rgba(183,9,9,0.08); color: #b70909; }

body.dark-mode .stat-icon--blue { background: rgba(var(--accent-rgb), 0.12); }
body.dark-mode .stat-icon--green { background: rgba(183, 9, 9, 0.15); color: #d42020; }

.stat-details h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.stat-details p {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

/* ========================================
   INVENTORY SECTION
   ======================================== */
.inventory-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.inventory-toolbar {
    margin-bottom: 1.25rem;
}

.toolbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.toolbar-top h2 {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 700;
}

.inventory-search {
    position: relative;
    width: 100%;
    max-width: 280px;
}

.inventory-search svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.inventory-search input {
    width: 100%;
    padding: 0.55rem 0.85rem 0.55rem 2.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: inherit;
}

.inventory-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.toolbar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: var(--bg-surface);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

body.dark-mode .toolbar-controls {
    background: var(--bg-main);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.control-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-pills {
    display: flex;
    gap: 0.35rem;
}

.filter-btn {
    padding: 0.4rem 0.95rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
}

.filter-btn:hover { border-color: var(--accent); color: var(--accent); }

.filter-btn.active {
    background: var(--accent);
    color: #1a1a1a;
    border-color: var(--accent);
    font-weight: 600;
}

body.dark-mode .filter-btn {
    border-color: #3d3d3d;
    background: #2a2a2a;
    color: #ccc;
}

body.dark-mode .filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1a1a;
}

/* Select */
.std-select {
    padding: 0.45rem 2rem 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: all var(--transition);
    font-family: inherit;
}

.std-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

body.dark-mode .std-select {
    border-color: #3d3d3d;
    background: #2a2a2a;
    color: #e8e4e0;
}

.select-wrapper {
    position: relative;
    display: inline-block;
}

.select-wrapper.full-width { display: block; }

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    border: solid var(--text-muted);
    border-width: 0 1.5px 1.5px 0;
    display: inline-block;
    padding: 2.5px;
    transform: translateY(-60%) rotate(45deg);
    pointer-events: none;
}

/* ========================================
   POSTERS GRID
   ======================================== */
.posters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem; /* space for shadows */
}

.loading-state {
    grid-column: 1 / -1;
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* ========================================
   POSTER CARDS
   ======================================== */
.card-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
    background: var(--bg-card);
    position: relative;
}

.card-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px) scale(1.01);
    border-color: var(--accent);
}

.card-item:hover .card-img {
    transform: scale(1.05);
}

.card-img-container {
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition);
}

body.dark-mode .card-img { background: #141414; }

.card-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

body.dark-mode .card-placeholder { background: #141414; }

.card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    color: var(--primary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.poster-details-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    line-height: 1.4;
}

.detail-label {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.detail-label svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.detail-val {
    font-weight: 600;
    color: var(--primary);
    text-align: right;
    max-width: 55%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-val.highlight {
    color: var(--success);
    background: var(--success-bg);
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
}

body.dark-mode .detail-val.highlight {
    background: var(--success-bg);
}

.card-actions {
    margin-top: auto;
    display: flex;
    gap: 0.35rem;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--border);
}

.action-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.45rem;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
    font-family: inherit;
    line-height: 1.4;
}

.action-edit { color: var(--accent); }
.action-edit:hover { background: rgba(220,178,83,0.1); }
.action-del { color: var(--danger); }
.action-del:hover { background: rgba(183,9,9,0.08); }

body.dark-mode .action-edit { color: #e8c96a; }
body.dark-mode .action-edit:hover { background: rgba(var(--accent-rgb), 0.15); }
body.dark-mode .action-del { color: #d42020; }
body.dark-mode .action-del:hover { background: rgba(183, 9, 9, 0.15); }

/* ========================================
   MODALS
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden { display: none; }

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.25s ease-out;
}

.modal-content--sm { max-width: 460px; }

@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 1.15rem;
    color: var(--primary);
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.close-btn:hover { background: var(--bg-surface); color: var(--primary); }
.close-btn svg { width: 20px; height: 20px; }

body.dark-mode .close-btn:hover { background: #2a2a2a; }

.modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1 1 auto;
}

.modal-body--scrollable { max-height: 400px; }

.modal-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ========================================
   FORMS
   ======================================== */
.standard-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.standard-form > .modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    background: var(--bg-main);
    transition: border-color var(--transition), box-shadow var(--transition);
    line-height: 1.5;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

body.dark-mode .form-group input,
body.dark-mode .form-group select {
    background: #141414;
    color: var(--text-main);
}

/* Locations form */
.add-location-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.add-location-form input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-main);
    background: var(--bg-main);
    transition: border-color var(--transition);
}

.add-location-form input:focus {
    outline: none;
    border-color: var(--accent);
}

body.dark-mode .add-location-form input {
    background: #141414;
    color: var(--text-main);
}

.locations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Image preview */
.image-preview-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    max-height: 180px;
}

body.dark-mode .image-preview-wrapper { background: #141414; }

.image-preview-wrapper img {
    height: 100%;
    max-height: 160px;
    object-fit: contain;
    border-radius: 4px;
}

/* Autocomplete */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 280px;
    overflow-y: auto;
    z-index: 10;
    margin-top: 0.35rem;
}

body.dark-mode .suggestions-dropdown { background: var(--bg-card); }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: var(--bg-surface); }

body.dark-mode .dropdown-item:hover { background: #2a2a2a; }

.dropdown-item img {
    width: 36px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg-surface);
    flex-shrink: 0;
}

body.dark-mode .dropdown-item img { background: #141414; }

.dropdown-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dropdown-item-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item-year {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   DUPLICATE BANNER
   ======================================== */
.duplicate-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #f59e0b;
    margin-bottom: 1rem;
    animation: bannerSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

@keyframes bannerSlideIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.duplicate-banner-icon { 
    color: #b45309; 
    flex-shrink: 0; 
    background: rgba(217, 119, 6, 0.15);
    padding: 0.4rem;
    border-radius: 50%;
    display: flex;
}
.duplicate-banner-icon svg { width: 20px; height: 20px; }

.duplicate-banner-content {
    flex: 1;
    font-size: 0.85rem;
    color: #78350f;
    line-height: 1.5;
    font-weight: 500;
}

.duplicate-banner-action {
    flex-shrink: 0;
    background: #ea580c;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(234, 88, 12, 0.2);
}

.duplicate-banner-action:hover { 
    background: #c2410c; 
    box-shadow: 0 4px 8px rgba(234, 88, 12, 0.3);
    transform: translateY(-1px);
}

body.dark-mode .duplicate-banner { 
    background: linear-gradient(135deg, #451a03 0%, #2e1002 100%); 
    border-color: #9a3412; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
body.dark-mode .duplicate-banner-content { color: #fed7aa; }
body.dark-mode .duplicate-banner-icon { color: #f97316; background: rgba(249, 115, 22, 0.15); }
body.dark-mode .duplicate-banner-action { background: #ea580c; }
body.dark-mode .duplicate-banner-action:hover { background: #c2410c; }

/* ========================================
   UTILITY
   ======================================== */
.hidden { display: none !important; }

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet */
@media (max-width: 768px) {
    .page-content { padding: 1rem; }

    .page-title { font-size: 1.35rem; }

    .toolbar-top { flex-direction: column; align-items: stretch; }
    .inventory-search { max-width: 100%; }

    .toolbar-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .control-group { justify-content: space-between; }

    .posters-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }

    .form-row { grid-template-columns: 1fr; }

    .modal { padding: 0.5rem; }
    .modal-content { max-width: 100%; border-radius: var(--radius-md); }
}

/* Mobile */
@media (max-width: 480px) {
    .top-nav-inner { padding: 0.5rem 0.75rem; }

    .brand span { font-size: 0.95rem; }
    .brand-logo { width: 30px; height: 30px; }

    .btn-label { display: none; }
    .btn-secondary, .btn-primary {
        padding: 0.5rem;
    }
    .btn-secondary svg, .btn-primary svg {
        width: 18px;
        height: 18px;
    }

    .page-content { padding: 0.75rem; }
    .page-title { font-size: 1.25rem; }
    .page-subtitle { font-size: 0.9rem; }

    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .stat-card { padding: 0.85rem; gap: 0.6rem; }
    .stat-icon { width: 36px; height: 36px; }
    .stat-icon svg { width: 18px; height: 18px; }
    .stat-details h3 { font-size: 0.7rem; }
    .stat-details p { font-size: 1.2rem; }

    .inventory-section { padding: 0.85rem; }
    .toolbar-top h2 { font-size: 1rem; }

    .filter-btn { padding: 0.35rem 0.7rem; font-size: 0.8rem; }

    .posters-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.65rem;
    }

    .card-body { padding: 0.75rem; }
    .card-title { font-size: 0.9rem; margin-bottom: 0.55rem; }
    .detail-item { font-size: 0.78rem; }
    .detail-label svg { width: 12px; height: 12px; }
    .action-btn { font-size: 0.78rem; padding: 0.35rem; }

    .modal-header { padding: 1rem; }
    .modal-header h2 { font-size: 1.05rem; }
    .modal-body { padding: 1rem; }
    .modal-footer { padding: 0.85rem 1rem; }
}

/* Large screens */
@media (min-width: 1200px) {
    .posters-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }
}
