/* ==========================================================================
   AI Tools Collection - shadcn/ui inspired dark theme
   ========================================================================== */

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

/* Design Tokens - shadcn/ui dark theme inspired */
:root {
    /* Colors */
    --background: hsl(240 10% 3.9%);
    --foreground: hsl(0 0% 98%);
    --card: hsl(240 10% 3.9%);
    --card-foreground: hsl(0 0% 98%);
    --popover: hsl(240 10% 3.9%);
    --popover-foreground: hsl(0 0% 98%);
    --primary: hsl(0 0% 98%);
    --primary-foreground: hsl(240 5.9% 10%);
    --secondary: hsl(240 3.7% 15.9%);
    --secondary-foreground: hsl(0 0% 98%);
    --muted: hsl(240 3.7% 15.9%);
    --muted-foreground: hsl(240 5% 64.9%);
    --accent: hsl(240 3.7% 15.9%);
    --accent-foreground: hsl(0 0% 98%);
    --destructive: hsl(0 62.8% 30.6%);
    --destructive-foreground: hsl(0 0% 98%);
    --border: hsl(240 3.7% 15.9%);
    --input: hsl(240 3.7% 15.9%);
    --ring: hsl(240 4.9% 83.9%);
    
    /* Semantic Colors */
    --success: hsl(142 76% 36%);
    --warning: hsl(38 92% 50%);
    --error: hsl(0 84% 60%);
    
    /* Spacing */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--foreground);
    min-height: 100vh;
    line-height: 1.5;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: hsl(240 10% 3.9% / 0.8);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
    color: inherit;
}

.logo:hover {
    opacity: 0.9;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

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

.btn-primary:hover {
    background: hsl(0 0% 90%);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: hsl(240 3.7% 20%);
}

.btn-ghost {
    background: transparent;
    color: var(--foreground);
}

.btn-ghost:hover {
    background: var(--accent);
}

.btn-danger {
    background: var(--destructive);
    color: var(--destructive-foreground);
}

.btn-danger:hover {
    background: hsl(0 62.8% 35%);
}

.btn-icon {
    padding: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* Admin Button */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted-foreground);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.admin-btn:hover {
    background: var(--accent);
    color: var(--accent-foreground);
    border-color: var(--accent);
}

.admin-btn.active {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: var(--secondary);
    border-radius: var(--radius-md);
    padding: 0.25rem;
    gap: 0.125rem;
}

.view-toggle button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    padding: 0.375rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.view-toggle button:hover {
    color: var(--foreground);
}

.view-toggle button.active {
    background: var(--background);
    color: var(--foreground);
    box-shadow: var(--shadow-sm);
}

.view-toggle button svg {
    width: 1rem;
    height: 1rem;
}

/* ==========================================================================
   Icons
   ========================================================================== */

.icon-sm {
    width: 1rem;
    height: 1rem;
}

.icon-md {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-lg {
    width: 1.5rem;
    height: 1.5rem;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem;
    color: var(--muted-foreground);
}

.spinner {
    width: 2rem;
    height: 2rem;
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted-foreground);
}

.empty-state-icon {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Admin Toolbar
   ========================================================================== */

.admin-toolbar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* ==========================================================================
   Category Sections
   ========================================================================== */

.category-section {
    margin-bottom: 3rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.category-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.category-header .description {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.category-actions {
    margin-left: auto;
    display: flex;
    gap: 0.25rem;
}

.category-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.category-actions button:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}

.category-actions button.delete:hover {
    background: hsl(0 62.8% 30.6% / 0.2);
    color: var(--error);
}

.category-actions button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.category-actions button:disabled:hover {
    background: transparent;
    color: var(--muted-foreground);
}

/* ==========================================================================
   Items Grid
   ========================================================================== */

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

/* View modes */
.view-mode-list .items-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.view-mode-mini .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}

.item-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
}

.item-card:hover {
    border-color: hsl(240 3.7% 25%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.item-card[draggable="true"] {
    cursor: grab;
}

.item-card[draggable="true"]:active {
    cursor: grabbing;
}

.item-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.item-card.drag-over {
    border-color: var(--ring);
    box-shadow: 0 0 0 2px hsl(240 4.9% 83.9% / 0.3);
}

.item-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.item-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: var(--muted);
}

.item-thumbnail.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    padding: 0;
    overflow: hidden;
}

.item-thumbnail.placeholder svg.default-thumb-svg {
    width: 100%;
    height: 100%;
}

.item-thumbnail.placeholder svg:not(.default-thumb-svg) {
    width: 2.5rem;
    height: 2.5rem;
    opacity: 0.5;
}

.item-thumbnail.error {
    display: none;
}

.item-content {
    padding: 0.75rem;
}

.item-content h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.item-content .og-title {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.item-content .comment {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.item-content .url {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.item-content .url svg {
    width: 0.75rem;
    height: 0.75rem;
    opacity: 0.7;
}

/* List View */
.view-mode-list .item-card {
    border-radius: var(--radius-md);
}

.view-mode-list .item-card:hover {
    transform: none;
}

.view-mode-list .item-card a {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-mode-list .item-thumbnail {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
}

.view-mode-list .item-thumbnail.placeholder svg {
    width: 1.5rem;
    height: 1.5rem;
}

.view-mode-list .item-content {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.75rem 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-mode-list .item-content h3 {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.view-mode-list .item-content .og-title,
.view-mode-list .item-content .comment {
    display: none;
}

.view-mode-list .item-content .url {
    margin: 0;
    padding: 0;
    border: none;
    flex-shrink: 0;
}

.view-mode-list .item-actions {
    position: static;
    opacity: 1;
    padding-right: 0.75rem;
}

.view-mode-list .add-item-card {
    min-height: 60px;
    flex-direction: row;
    gap: 0.5rem;
}

.view-mode-list .add-item-card svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Mini View */
.view-mode-mini .category-section {
    margin-bottom: 1.5rem;
}

.view-mode-mini .category-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
}

.view-mode-mini .category-header h2 {
    font-size: 1rem;
}

.view-mode-mini .item-card {
    border-radius: var(--radius-md);
}

.view-mode-mini .item-card:hover {
    transform: translateY(-1px);
}

.view-mode-mini .item-thumbnail {
    height: 70px;
}

.view-mode-mini .item-thumbnail.placeholder svg {
    width: 1.5rem;
    height: 1.5rem;
}

.view-mode-mini .item-content {
    padding: 0.5rem;
}

.view-mode-mini .item-content h3 {
    font-size: 0.75rem;
}

.view-mode-mini .item-content .og-title,
.view-mode-mini .item-content .comment,
.view-mode-mini .item-content .url {
    display: none;
}

.view-mode-mini .item-actions {
    top: 0.25rem;
    right: 0.25rem;
    gap: 0.25rem;
}

.view-mode-mini .item-actions button {
    width: 1.5rem;
    height: 1.5rem;
}

.view-mode-mini .item-actions button svg {
    width: 0.75rem;
    height: 0.75rem;
}

.view-mode-mini .add-item-card {
    min-height: 110px;
}

.view-mode-mini .add-item-card svg {
    width: 1.5rem;
    height: 1.5rem;
}

.view-mode-mini .add-item-card span {
    font-size: 0.75rem;
}

/* Item Actions */
.item-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.375rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.item-card:hover .item-actions {
    opacity: 1;
}

.item-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsl(240 10% 3.9% / 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    color: var(--foreground);
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.item-actions button svg {
    width: 1rem;
    height: 1rem;
}

.item-actions button:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.item-actions button.delete:hover {
    background: var(--destructive);
    border-color: var(--destructive);
}

/* Add Item Card */
.add-item-card {
    background: transparent;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--muted-foreground);
}

.add-item-card:hover {
    border-color: hsl(240 3.7% 30%);
    background: hsl(240 3.7% 15.9% / 0.3);
    color: var(--foreground);
}

.add-item-card svg {
    width: 2.5rem;
    height: 2.5rem;
}

.add-item-card span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* ==========================================================================
   Modal - Base UI inspired
   ========================================================================== */

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: hsl(0 0% 0% / 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 28rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modal-enter 200ms ease-out;
}

.modal-lg {
    max-width: 32rem;
}

.modal-sm {
    max-width: 24rem;
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.modal-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}

.modal-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: hsl(240 10% 3.9% / 0.5);
}

/* Confirm Modal */
.confirm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.confirm-icon svg {
    width: 3rem;
    height: 3rem;
    color: var(--warning);
}

#confirm-message {
    text-align: center;
    color: var(--muted-foreground);
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
}

.form-group .optional {
    font-weight: 400;
    color: var(--muted-foreground);
}

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

.input-icon {
    position: absolute;
    left: 0.75rem;
    width: 1rem;
    height: 1rem;
    color: var(--muted-foreground);
    pointer-events: none;
}

.input-wrapper input[type="text"],
.input-wrapper input[type="password"],
.input-wrapper input[type="url"],
.input-wrapper input[type="email"],
.input-wrapper input[type="number"] {
    padding-left: 2.5rem;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--foreground);
    font-family: inherit;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
    color: var(--muted-foreground);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px hsl(240 4.9% 83.9% / 0.1);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

textarea {
    min-height: 5rem;
    resize: vertical;
    line-height: 1.5;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button .input-wrapper {
    flex: 1;
}

/* OG Preview */
.og-preview {
    display: flex;
    gap: 1rem;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.875rem;
    margin-bottom: 1.25rem;
}

.og-preview.hidden {
    display: none;
}

.og-preview img {
    width: 5rem;
    height: 3.75rem;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--background);
}

.og-preview img[src=""] {
    display: none;
}

.og-preview-text {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.og-preview-text strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.og-preview-text p {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--error);
    font-size: 0.8125rem;
    margin-top: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: hsl(0 84% 60% / 0.1);
    border-radius: var(--radius-md);
}

.success-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success);
    font-size: 0.8125rem;
    margin-top: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: hsl(142 76% 36% / 0.1);
    border-radius: var(--radius-md);
}

.hidden {
    display: none !important;
}

/* Legacy classes for JS compatibility */
.error {
    color: var(--error);
    font-size: 0.8125rem;
    margin-top: 0.5rem;
}

.success {
    color: var(--success);
    font-size: 0.8125rem;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.125rem;
    }
    
    .logo-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    main {
        padding: 1.25rem;
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .item-thumbnail {
        height: 120px;
    }
    
    .item-content {
        padding: 0.875rem;
    }
    
    .category-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .category-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
    
    .modal-content {
        max-height: calc(100vh - 2rem);
    }
    
    .admin-toolbar {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .admin-toolbar .btn {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .item-thumbnail {
        height: 100px;
    }
    
    .add-item-card {
        min-height: 180px;
    }
    
    .input-with-button {
        flex-direction: column;
    }
    
    .input-with-button .btn {
        width: 100%;
    }
}
