/* ==========================================================================
   Bucket List — Neo-Brutalism + M3 Expressive Design System
   ==========================================================================
   Color Coding:
     Undone -> Stark Red theme (#FF4444 primary)
     Done   -> Stark Green theme (#22C55E primary)
   
   Borders: Thick 3-5px solid black
   Shadows: Sharp, non-blurred (e.g. 6px 6px 0px #000)
   Motion:  M3 Expressive cubic-bezier easing
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    /* Core palette */
    --bg:              #F5F0E8;
    --bg-card:         #FFFFFF;
    --text:            #1A1A1A;
    --text-muted:      #555555;
    --border:          #1A1A1A;
    --border-width:    4px;
    
    /* Status colors */
    --red:             #FF4444;
    --red-light:       #FFE0E0;
    --red-bg:          #FFF0F0;
    --green:           #22C55E;
    --green-light:     #D1FAE5;
    --green-bg:        #F0FFF4;
    
    /* Accent colors */
    --yellow:          #FFD60A;
    --blue:            #3B82F6;
    --purple:          #8B5CF6;
    --orange:          #FF8C00;
    --pink:            #FF6B9D;
    
    /* Shadows — sharp, no blur */
    --shadow:          6px 6px 0px var(--border);
    --shadow-sm:       3px 3px 0px var(--border);
    --shadow-hover:    8px 8px 0px var(--border);
    --shadow-active:   2px 2px 0px var(--border);
    
    /* M3 Expressive easing curves */
    --ease-bounce:     cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth:     cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-spring:     cubic-bezier(0.22, 1.2, 0.36, 1);
    --ease-decel:      cubic-bezier(0.0, 0.0, 0.2, 1);
    
    /* Spacing */
    --space-xs:        4px;
    --space-sm:        8px;
    --space-md:        16px;
    --space-lg:        24px;
    --space-xl:        32px;
    --space-2xl:       48px;
    
    /* Typography */
    --font-body:       'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-heading:    'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-mono:       'Space Mono', 'Courier New', monospace;
    
    /* Border radius */
    --radius:          8px;
    --radius-sm:       4px;
    --radius-lg:       12px;
}

/* --------------------------------------------------------------------------
   Lucide Icons — Inline SVG Icon Styling
   -------------------------------------------------------------------------- */
.lucide {
    width: 1em;
    height: 1em;
    stroke-width: 2.5;
    vertical-align: -0.125em;
    display: inline-block;
    flex-shrink: 0;
}

.app-header h1 .header-icon {
    display: inline-flex;
    align-items: center;
    animation: wobble 2s ease-in-out infinite;
}

.app-header h1 .header-icon .lucide {
    width: 1.4em;
    height: 1.4em;
}

.empty-state-icon {
    margin-bottom: var(--space-md);
    color: var(--yellow);
}

.empty-state-icon .lucide {
    width: 4rem;
    height: 4rem;
    stroke-width: 1.5;
}

.btn .lucide { width: 0.95em; height: 0.95em; }
.admin-banner .lucide { width: 1em; height: 1em; vertical-align: -0.15em; }
.toast .lucide { width: 1.2em; height: 1.2em; }
.card-expand-icon .lucide { width: 1em; height: 1em; stroke-width: 3; }
.modal-header h2 .lucide { width: 1.1em; height: 1.1em; vertical-align: -0.15em; margin-right: 4px; }
.status-toggle-option .lucide { width: 1em; height: 1em; }
.fields-editor-header h3 .lucide { width: 1em; height: 1em; vertical-align: -0.15em; }

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    background-image: radial-gradient(circle, #d4d0c8 1px, transparent 1px);
    background-size: 24px 24px;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-transform: uppercase;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

p { line-height: 1.6; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Layout: Header
   -------------------------------------------------------------------------- */
.app-header {
    background: var(--yellow);
    border-bottom: var(--border-width) solid var(--border);
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 0px var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(12deg); }
    75%      { transform: rotate(-12deg); }
}

.header-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

/* --------------------------------------------------------------------------
   Buttons — Neo-Brutalist
   -------------------------------------------------------------------------- */
.btn {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    padding: var(--space-sm) var(--space-md);
    border: 3px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--bg-card);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: all 0.15s var(--ease-bounce);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    white-space: nowrap;
    user-select: none;
}

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

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-active);
}

.btn-primary { background: var(--yellow); }
.btn-danger { background: var(--red); color: white; }
.btn-success { background: var(--green); color: white; }

.btn-sm {
    font-size: 0.75rem;
    padding: var(--space-xs) var(--space-sm);
    border-width: 2px;
    box-shadow: 2px 2px 0px var(--border);
}

.btn-sm:hover { box-shadow: var(--shadow-sm); }

.btn-icon {
    padding: var(--space-xs) var(--space-sm);
    font-size: 1.1rem;
    line-height: 1;
}

/* --------------------------------------------------------------------------
   Main Content Area
   -------------------------------------------------------------------------- */
.app-main {
    max-width: 900px;
    margin: var(--space-2xl) auto;
    padding: 0 var(--space-md);
}

/* --------------------------------------------------------------------------
   Empty State
   -------------------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    border: var(--border-width) dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    margin-top: var(--space-lg);
}

.empty-state p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

/* --------------------------------------------------------------------------
   Bucket List Cards
   -------------------------------------------------------------------------- */
.bucket-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.bucket-card {
    background: var(--bg-card);
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s var(--ease-spring);
    position: relative;
}

.bucket-card.status-undone { border-left: 8px solid var(--red); }
.bucket-card.status-undone .card-status-badge { background: var(--red); color: #fff; }
.bucket-card.status-undone .card-header { background: var(--red-bg); }

.bucket-card.status-done { border-left: 8px solid var(--green); }
.bucket-card.status-done .card-status-badge { background: var(--green); color: #fff; }
.bucket-card.status-done .card-header { background: var(--green-bg); }
.bucket-card.status-done .card-title {
    text-decoration: line-through;
    text-decoration-thickness: 3px;
    opacity: 0.7;
}

.bucket-card:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: var(--shadow-hover);
    z-index: 2;
}

.bucket-card:active {
    transform: translateY(1px) scale(0.99);
    box-shadow: var(--shadow-active);
}

.card-header {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    position: relative;
}

.card-status-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 999px;
    border: 2px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    flex-shrink: 0;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 800;
    flex: 1;
    text-transform: uppercase;
}

.card-expand-icon {
    font-size: 1.2rem;
    transition: transform 0.4s var(--ease-bounce);
    flex-shrink: 0;
}

.bucket-card.expanded .card-expand-icon {
    transform: rotate(180deg);
}

.card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease-decel), padding 0.3s var(--ease-smooth);
    padding: 0 var(--space-lg);
}

.bucket-card.expanded .card-body {
    max-height: 3000px;
    padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.card-description {
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
    line-height: 1.7;
    color: var(--text-muted);
}

.card-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border: 3px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-md);
}

.card-fields {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.card-fields-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
    border-bottom: 2px solid var(--border);
    padding-bottom: var(--space-xs);
}

.field-item {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    box-shadow: 2px 2px 0px var(--border);
    transition: all 0.2s var(--ease-bounce);
}

.field-item:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-sm);
}

.field-title { font-size: 0.95rem; font-weight: 700; margin-bottom: var(--space-xs); }
.field-description { font-size: 0.85rem; color: var(--text-muted); margin-bottom: var(--space-sm); }

.field-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: var(--space-sm);
}

.card-admin-actions {
    display: none;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg) var(--space-md);
    flex-wrap: wrap;
}

body.admin-mode .card-admin-actions { display: flex; }
.card-admin-actions .btn { position: relative; z-index: 5; }

/* --------------------------------------------------------------------------
   Admin Mode Indicator
   -------------------------------------------------------------------------- */
.admin-banner {
    display: none;
    background: var(--purple);
    color: white;
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-bottom: 3px solid var(--border);
}

body.admin-mode .admin-banner { display: flex; align-items: center; justify-content: center; gap: var(--space-xs); }
body.admin-mode .btn-admin-login { display: none; }
.btn-admin-logout { display: none !important; }
body.admin-mode .btn-admin-logout { display: inline-flex !important; background: var(--purple); color: white; }
.btn-add-item { display: none !important; }
body.admin-mode .btn-add-item { display: inline-flex !important; }

/* --------------------------------------------------------------------------
   Modals — Neo-Brutalist
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-smooth);
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
    background: var(--bg-card);
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
    box-shadow: 10px 10px 0px var(--border);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(40px);
    transition: transform 0.4s var(--ease-bounce);
}

.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--yellow);
}

.modal-header h2 {
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.modal-body { padding: var(--space-lg); }

.modal-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 3px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    background: #fafafa;
}

/* --------------------------------------------------------------------------
   Form Elements
   -------------------------------------------------------------------------- */
.form-group { margin-bottom: var(--space-md); }

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-xs);
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 3px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s var(--ease-bounce);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    box-shadow: var(--shadow);
    transform: translate(-1px, -1px);
    border-color: var(--blue);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.image-picker {
    border: 3px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    background: #fafafa;
}

.image-picker-tabs {
    display: flex;
    gap: 0;
    margin-bottom: var(--space-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.image-picker-tab {
    flex: 1;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    background: var(--bg);
    border: none;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    font-family: var(--font-body);
    letter-spacing: 0.05em;
}

.image-picker-tab:not(:last-child) { border-right: 2px solid var(--border); }
.image-picker-tab.active { background: var(--yellow); font-weight: 800; }
.image-picker-panel { display: none; }
.image-picker-panel.active { display: block; }

.image-preview {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: var(--space-sm);
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--space-sm);
    max-height: 200px;
    overflow-y: auto;
}

.asset-grid-item {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease-bounce);
}

.asset-grid-item:hover { transform: scale(1.05); box-shadow: var(--shadow-sm); }

.asset-grid-item.selected {
    border-color: var(--blue);
    border-width: 3px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* --------------------------------------------------------------------------
   Fields Editor
   -------------------------------------------------------------------------- */
.fields-editor {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 3px dashed var(--border);
}

.fields-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.fields-editor-header h3 {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.field-editor-item {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    box-shadow: 2px 2px 0px var(--border);
    position: relative;
}

.field-editor-item .field-number {
    position: absolute;
    top: -8px;
    left: 12px;
    background: var(--purple);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 8px;
    border-radius: 999px;
    border: 2px solid var(--border);
}

.field-remove-btn {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
}

/* --------------------------------------------------------------------------
   TOTP Login Modal
   -------------------------------------------------------------------------- */
.totp-input {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.5em;
    font-family: var(--font-mono);
    padding: var(--space-md) !important;
}

/* --------------------------------------------------------------------------
   Loading & Animations
   -------------------------------------------------------------------------- */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 5px solid var(--border);
    border-top-color: var(--yellow);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

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

.bucket-card { animation: cardEnter 0.35s var(--ease-spring) forwards; }
.bucket-card:nth-child(1)  { animation-delay: 0.00s; }
.bucket-card:nth-child(2)  { animation-delay: 0.06s; }
.bucket-card:nth-child(3)  { animation-delay: 0.12s; }
.bucket-card:nth-child(4)  { animation-delay: 0.18s; }
.bucket-card:nth-child(5)  { animation-delay: 0.24s; }
.bucket-card:nth-child(6)  { animation-delay: 0.30s; }
.bucket-card:nth-child(7)  { animation-delay: 0.36s; }
.bucket-card:nth-child(8)  { animation-delay: 0.42s; }
.bucket-card:nth-child(9)  { animation-delay: 0.48s; }
.bucket-card:nth-child(10) { animation-delay: 0.54s; }

/* Notification toast */
.toast {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: var(--space-md) var(--space-lg);
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 2000;
    transform: translateY(120%);
    transition: transform 0.4s var(--ease-bounce);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.toast.show { transform: translateY(0); }
.toast.success { border-left: 6px solid var(--green); }
.toast.error { border-left: 6px solid var(--red); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    .app-header { flex-direction: column; gap: var(--space-sm); text-align: center; }
    .app-header h1 { font-size: 1.3rem; }
    .modal { max-width: 100%; margin: var(--space-sm); }
    h1 { font-size: 1.8rem; }
    .card-header { padding: var(--space-sm) var(--space-md); }
    .card-body { padding-left: var(--space-md); padding-right: var(--space-md); }
    .bucket-card.expanded .card-body { padding: var(--space-sm) var(--space-md) var(--space-md); }
    .card-admin-actions { padding: var(--space-sm) var(--space-md) var(--space-md); }
}

/* --------------------------------------------------------------------------
   Scrollbar Styling
   -------------------------------------------------------------------------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* --------------------------------------------------------------------------
   Status Toggle Switch
   -------------------------------------------------------------------------- */
.status-toggle {
    display: flex;
    border: 3px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.status-toggle-option {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    background: var(--bg);
    transition: all 0.2s var(--ease-smooth);
    border: none;
    font-family: var(--font-body);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

.status-toggle-option:first-child { border-right: 3px solid var(--border); }
.status-toggle-option.active-undone { background: var(--red); color: white; }
.status-toggle-option.active-done { background: var(--green); color: white; }

.image-clear-btn { margin-top: var(--space-xs); }

/* --------------------------------------------------------------------------
   Tracker UI Subcomponents
   -------------------------------------------------------------------------- */
.card-subtasks {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.card-subtask-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    background: var(--bg);
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0px var(--border);
    cursor: pointer;
    transition: all 0.2s var(--ease-bounce);
}

.card-subtask-item:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-sm);
}

.card-subtask-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--green);
}

.subtask-label-text {
    font-size: 0.95rem;
    font-weight: 600;
    flex: 1;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.card-subtask-item.subtask-done .subtask-label-text {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: 0.7;
}

.card-counter-wrap {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    box-shadow: 2px 2px 0px var(--border);
    margin-bottom: var(--space-md);
}

.card-counter-bar-bg {
    width: 100%;
    height: 16px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.card-counter-bar-fill {
    height: 100%;
    background: var(--green);
    transition: width 0.3s var(--ease-spring);
    border-right: 2px solid var(--border);
    min-width: 4px;
}

.card-counter-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-counter-text {
    font-weight: 800;
    font-size: 1.1rem;
    font-family: var(--font-mono);
}

.card-counter-actions {
    display: flex;
    gap: var(--space-xs);
}

.tracker-ui {
    animation: cardEnter 0.3s var(--ease-spring);
}

/* --------------------------------------------------------------------------
   Suggest an Item Card — Always first, blue themed
   -------------------------------------------------------------------------- */
.suggest-card {
    background: var(--blue);
    border: var(--border-width) solid var(--border);
    border-left: 8px solid #1d4ed8;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s var(--ease-spring);
    position: relative;
    animation: cardEnter 0.35s var(--ease-spring) forwards, suggestPulse 3s ease-in-out infinite 1s;
}

@keyframes suggestPulse {
    0%, 100% { box-shadow: var(--shadow); }
    50%       { box-shadow: 6px 6px 0px var(--border), 0 0 20px rgba(59, 130, 246, 0.4); }
}

.suggest-card:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: var(--shadow-hover), 0 0 30px rgba(59, 130, 246, 0.5);
    z-index: 2;
}

.suggest-card:active {
    transform: translateY(1px) scale(0.99);
    box-shadow: var(--shadow-active);
}

.suggest-card .card-header {
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
}

.suggest-card .card-title {
    color: white;
    font-size: 1.15rem;
    font-weight: 800;
    flex: 1;
    text-transform: uppercase;
}

.suggest-card .suggest-card-icon {
    width: 2rem;
    height: 2rem;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    animation: wobble 2.5s ease-in-out infinite;
}

.suggest-card .suggest-card-icon .lucide {
    width: 1.1rem;
    height: 1.1rem;
}

.suggest-card .suggest-invite-text {
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Suggest Status (AI feedback inside modal)
   -------------------------------------------------------------------------- */
.suggest-status {
    border: 3px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.suggest-status.thinking {
    background: #EFF6FF;
    border-color: var(--blue);
    color: #1d4ed8;
}

.suggest-status.success {
    background: var(--green-bg);
    border-color: var(--green);
    color: #166534;
}

.suggest-status.error {
    background: var(--red-bg);
    border-color: var(--red);
    color: #991b1b;
}

.suggest-status .status-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
}

.suggest-status-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
    margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Admin Suggestions Inbox Panel
   -------------------------------------------------------------------------- */
.suggestions-inbox {
    background: white;
    border: var(--border-width) solid var(--border);
    border-left: 8px solid var(--purple);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: var(--space-lg);
    overflow: hidden;
    animation: cardEnter 0.4s var(--ease-spring);
}

.suggestions-inbox-header {
    background: var(--purple);
    color: white;
    padding: var(--space-sm) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.suggestions-inbox-title {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.suggestions-inbox-title .lucide {
    width: 1em;
    height: 1em;
}

.suggestions-inbox-badge {
    background: var(--yellow);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 900;
    padding: 2px 10px;
    border-radius: 999px;
    border: 2px solid white;
    min-width: 24px;
    text-align: center;
}

.suggestion-inbox-item {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 2px solid var(--bg);
    transition: background 0.2s ease;
}

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

.suggestion-inbox-item:hover {
    background: #fafafa;
}

.suggestion-inbox-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xs);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.suggestion-author,
.suggestion-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.suggestion-author .lucide,
.suggestion-date .lucide {
    width: 0.85em;
    height: 0.85em;
}

.suggestion-inbox-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-xs);
}

.suggestion-inbox-why {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: var(--space-md);
    line-height: 1.5;
    border-left: 3px solid var(--purple);
    padding-left: var(--space-sm);
    background: #fbf7ff;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.suggestion-inbox-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.suggestion-action-status {
    font-size: 0.85rem;
    font-weight: 600;
    flex: 1;
}
