/* Image Analyzer - Dark Theme CSS */

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --border-color: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-primary: #58a6ff;
    --accent-success: #3fb950;
    --accent-warning: #d29922;
    --accent-danger: #f85149;
    --accent-purple: #a371f7;

    --sidebar-width: 250px;
    --header-height: 60px;
    --radius: 8px;
    --radius-sm: 4px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --transition: 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: #79c0ff;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

.guest-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 18px;
}

.logo svg {
    color: var(--accent-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.sidebar-nav a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: var(--accent-primary);
    color: white;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

.nav-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 0 12px;
    margin-bottom: 8px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

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

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.logout-btn {
    padding: 8px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.logout-btn:hover {
    background: var(--accent-danger);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.content-header {
    height: var(--header-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
}

.content-body {
    padding: 24px;
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

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

.btn-primary:hover {
    background: #79c0ff;
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-danger:hover {
    background: #ff7b72;
    color: white;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select,
.form-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: var(--bg-tertiary);
    position: relative;
    transition: all var(--transition);
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Switch Toggle */
.switch-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.switch-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.switch input:checked + .switch-slider {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.switch input:checked + .switch-slider::before {
    transform: translateX(20px);
    background-color: white;
}

.switch input:focus + .switch-slider {
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.3);
}

.switch-text {
    font-size: 14px;
    color: var(--text-primary);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.table tr:hover {
    background: var(--bg-tertiary);
}

.table-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.table-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-danger {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
}

.alert-success {
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid var(--accent-success);
    color: var(--accent-success);
}

.alert-warning {
    background: rgba(210, 153, 34, 0.1);
    border: 1px solid var(--accent-warning);
    color: var(--accent-warning);
}

.alert-info {
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.badge-primary {
    background: rgba(88, 166, 255, 0.2);
    color: var(--accent-primary);
}

.badge-success {
    background: rgba(63, 185, 80, 0.2);
    color: var(--accent-success);
}

.badge-warning {
    background: rgba(210, 153, 34, 0.2);
    color: var(--accent-warning);
}

.badge-danger {
    background: rgba(248, 81, 73, 0.2);
    color: var(--accent-danger);
}

.badge-purple {
    background: rgba(163, 113, 247, 0.2);
    color: var(--accent-purple);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
}

.status-pending {
    background: rgba(210, 153, 34, 0.2);
    color: var(--accent-warning);
}

.status-processing {
    background: rgba(88, 166, 255, 0.2);
    color: var(--accent-primary);
}

.status-completed {
    background: rgba(63, 185, 80, 0.2);
    color: var(--accent-success);
}

.status-failed {
    background: rgba(248, 81, 73, 0.2);
    color: var(--accent-danger);
}

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

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

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(88, 166, 255, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.stat-icon-success {
    background: rgba(63, 185, 80, 0.1);
    color: var(--accent-success);
}

.stat-icon-warning {
    background: rgba(210, 153, 34, 0.1);
    color: var(--accent-warning);
}

.stat-icon-primary {
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent-primary);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Dashboard Grid */
.dashboard-grid,
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(88, 166, 255, 0.05);
}

.upload-zone svg {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.upload-zone p {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.upload-zone span {
    font-size: 13px;
    color: var(--text-secondary);
}

.upload-zone-large {
    padding: 60px 20px;
}

.upload-zone-large h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.upload-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Preview Container */
.preview-container {
    margin: 16px 0;
    text-align: center;
}

.preview-container img {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius);
}

.preview-container-large {
    margin: 24px 0;
    text-align: center;
}

.preview-container-large img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius);
}

.preview-actions {
    margin-top: 16px;
}

/* Result Container */
.result-container {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
}

.result-container h3 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.result-text {
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.result-container-large {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.result-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.result-text-large {
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* Recent Images */
.recent-images {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-image-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
    color: var(--text-primary);
}

.recent-image-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.image-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-info {
    flex: 1;
    min-width: 0;
}

.image-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-date {
    font-size: 12px;
    color: var(--text-secondary);
}

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

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    margin-bottom: 16px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Auth Pages */
.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
}

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

.auth-header svg {
    margin-bottom: 16px;
}

.auth-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form {
    margin-bottom: 24px;
}

.auth-footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Home Page */
.home-container {
    text-align: center;
    max-width: 600px;
}

.home-hero {
    padding: 40px;
}

.home-hero h1 {
    font-size: 36px;
    margin: 16px 0;
}

.home-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.home-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.feature svg {
    color: var(--accent-primary);
}

.home-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.home-links {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.home-link {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color var(--transition);
}

.home-link:hover {
    color: var(--accent-primary);
}

.home-link-divider {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Profile Page */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.stats-list {
    display: flex;
    flex-direction: column;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.stats-label {
    color: var(--text-secondary);
}

.stats-value {
    font-weight: 500;
}

/* Image Detail Page */
.image-detail-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
}

.image-preview-card {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-primary);
}

.image-preview-card img {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--radius);
}

.detail-list {
    display: flex;
    flex-direction: column;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.detail-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.detail-value {
    font-size: 14px;
    word-break: break-word;
}

.detail-actions {
    display: flex;
    gap: 12px;
}

.description-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
}

/* Settings Page */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

/* Status Indicators */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.status-online {
    color: var(--accent-success);
}

.status-offline {
    color: var(--accent-danger);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: all var(--transition);
}

.quick-action:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.quick-action svg {
    color: var(--accent-primary);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    z-index: 200;
}

.modal.active {
    display: block;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 500px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

/* Search Form */
.search-form {
    display: flex;
    gap: 8px;
}

.search-form input {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

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

/* Error Page */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.error-code {
    font-size: 120px;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1;
}

.error-content h2 {
    margin: 16px 0;
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Spinner */
.spinner {
    animation: spin 1s linear infinite;
    width: 20px;
    height: 20px;
}

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

/* Utilities */
.d-inline {
    display: inline;
}

.d-block {
    display: block;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 16px;
}

.text-muted {
    color: var(--text-secondary);
}

.text-success {
    color: var(--accent-success);
}

.text-danger {
    color: var(--accent-danger);
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: inline-block;
}

.small {
    font-size: 12px;
}

code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.api-key-code {
    font-size: 12px;
}

/* Toast Container */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
}

.toast-success {
    border-color: var(--accent-success);
}

.toast-error {
    border-color: var(--accent-danger);
}

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

/* Responsive */
@media (max-width: 1199px) {
    .image-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

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

    .menu-toggle {
        display: block;
    }

    .dashboard-grid,
    .admin-grid {
        grid-template-columns: 1fr;
    }

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

    .profile-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .home-features {
        flex-direction: column;
        gap: 16px;
    }

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

    .dashboard-stats,
    .admin-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .dashboard-stats,
    .admin-stats {
        grid-template-columns: 1fr;
    }
}
