/* Samochodoza - Dark Theme */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #3a3a3a;
    --bg-hover: #404040;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --accent-primary: #4a9eff;
    --accent-hover: #6ab0ff;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --border: #404040;
}

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

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

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

.login-container {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    text-align: center;
    min-width: 320px;
}

.login-container h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--accent-primary);
}

.login-container input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
}

.login-container button {
    width: 100%;
    padding: 0.8rem;
    background: var(--accent-primary);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-container button:hover {
    background: var(--accent-hover);
}

.version {
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.error-message {
    color: var(--danger);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* App Layout */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background: var(--bg-secondary);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.app-header h1 {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.main-nav {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.nav-btn {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.logout-btn {
    padding: 0.6rem 1.2rem;
    background: var(--danger);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: opacity 0.2s;
}

.logout-btn:hover {
    opacity: 0.9;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.view-header {
    margin-bottom: 2rem;
}

.view-header h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.view-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Buttons */
button, .btn-primary, .btn-secondary, .btn-danger {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover, .file-upload-btn:hover {
    background: var(--accent-hover);
}

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

.btn-secondary:hover {
    background: var(--bg-hover);
}

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

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    min-width: auto;
}

.btn-danger:hover {
    opacity: 0.9;
}

.file-upload-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
}

/* Checkboxes */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    user-select: none;
    margin-right: 1rem;
}

.radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

/* Input fields */
input[type="text"],
input[type="search"],
input[type="number"],
textarea,
select {
    padding: 0.6rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
}

/* Zoom controls */
.zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.zoom-controls input[type="range"] {
    width: 150px;
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size, 200px), 1fr));
    gap: 1rem;
}

.photo-item {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.photo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.photo-item.used {
    opacity: 0.5;
}

.photo-item.selected {
    outline: 3px solid var(--accent-primary);
}

.photo-checkbox {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
}

.photo-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.photo-item-info {
    padding: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.photo-date {
    cursor: help;
    border-bottom: 1px dotted var(--text-secondary);
    position: relative;
}

.photo-date:hover {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.photo-item-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.3rem;
    opacity: 0;
    transition: opacity 0.2s;
}

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

.photo-action-btn {
    padding: 0.4rem 0.6rem;
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
}

.photo-action-btn:hover {
    background: rgba(0,0,0,0.9);
}

/* Groups List */
.groups-list {
    display: grid;
    gap: 1rem;
}

.group-item {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    transition: box-shadow 0.2s;
}

.group-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.group-item.generated {
    opacity: 0.6;
}

.group-item.selected {
    outline: 3px solid var(--accent-primary);
}

.group-thumbnail {
    width: 120px;
    height: 120px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.group-info {
    flex: 1;
}

.group-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.group-info-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.group-info-label {
    font-weight: 600;
    color: var(--text-primary);
}

.group-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Upload Progress */
.upload-progress {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.upload-progress.hidden {
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Map */
.map-container {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    overflow: hidden;
}

.map-legend {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.marker-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.3rem;
}

.marker-dot.green {
    background: var(--success);
}

.marker-dot.red {
    background: var(--danger);
}

.marker-dot.black {
    background: #000;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 999;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    max-width: 90vw;
    max-height: 90vh;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
    width: 600px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-content.large {
    width: 900px;
}

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

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

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

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

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

/* Photo Editor - Cropper */
.crop-container {
    max-height: 60vh;
    margin-bottom: 1rem;
}

.crop-container img {
    max-width: 100%;
    display: block;
}

.crop-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.app-footer {
    background: var(--bg-secondary);
    padding: 1rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* System Stats */
.system-stats,
.disk-space-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-item,
.stat-card {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.stat-detail {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Violations List */
.violations-list {
    display: grid;
    gap: 0.5rem;
    margin: 1rem 0 2rem;
}

.violation-item {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.violation-info {
    flex: 1;
}

.violation-name {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.violation-basis {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.violation-actions {
    display: flex;
    gap: 0.3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .main-nav {
        width: 100%;
        overflow-x: auto;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
    }
    
    .group-item {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95vw;
    }
    
    .modal-content.large {
        width: 95vw;
    }
}

/* Group Form */
.group-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 8px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s;
}

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

.form-group input[readonly] {
    opacity: 0.6;
    cursor: not-allowed;
}

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

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

.violation-checkbox {
    background: var(--bg-secondary);
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    cursor: pointer;
}

.violation-checkbox:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

.violation-checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
}

.violation-checkbox label {
    cursor: pointer;
    font-size: 0.9rem;
}

.photos-preview-slider {
    width: 100%;
    height: 500px;
    position: relative;
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photos-preview-slider img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: rotate(0deg);
}

.photos-preview-slider .slider-nav-left,
.photos-preview-slider .slider-nav-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.photos-preview-slider .slider-nav-left:hover,
.photos-preview-slider .slider-nav-right:hover {
    background: rgba(0,0,0,0.9);
}

.photos-preview-slider .slider-nav-left {
    left: 1rem;
}

.photos-preview-slider .slider-nav-right {
    right: 1rem;
}

.photos-preview-slider .slider-info {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.photos-preview-slider .slider-actions {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.photos-preview-slider .slider-actions button {
    background: var(--danger);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.photos-thumbs-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.photos-thumbs-strip img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.photos-thumbs-strip img:hover {
    border-color: var(--accent-primary);
}

.photos-thumbs-strip img.active {
    border-color: var(--accent-primary);
}

.license-plate-section {
    background: var(--accent-primary);
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    border: 2px solid var(--accent-primary);
}

.license-plate-section input {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 2px;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.autocomplete-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
    gap: 1rem;
}

.autocomplete-item:hover {
    background: var(--bg-hover);
}

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

.autocomplete-item .plate-info {
    flex: 1;
    cursor: pointer;
}

.autocomplete-item .plate-actions {
    display: flex;
    gap: 0.5rem;
}

.autocomplete-item .plate {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent-primary);
}

.autocomplete-item .info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.autocomplete-item .archived-badge {
    display: inline-block;
    background: var(--warning);
    color: black;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.duplicate-warning {
    background: var(--warning);
    color: black;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    border-left: 4px solid #ff9800;
}

.group-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

.group-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--border);
}

.group-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.group-photo-remove:hover {
    opacity: 1;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.count-badge {
    display: inline-block;
    background: var(--accent-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-left: 0.5rem;
    min-width: 30px;
    text-align: center;
}

.count-badge:empty,
.count-badge[data-count="0"] {
    display: none;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Quick Group Slideshow */
.quick-group-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.98);
    z-index: 10000;
}

.quick-group-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

.quick-group-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 3rem;
    background: rgba(0,0,0,0.7);
    border: none;
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: background 0.2s;
}

.quick-group-close:hover {
    background: rgba(255,255,255,0.2);
}

.quick-group-content {
    display: flex;
    width: 100%;
    height: 100%;
}

.quick-group-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    padding: 2rem;
}

.quick-group-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.quick-group-sidebar {
    width: 400px;
    background: var(--bg-secondary);
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.quick-group-info h3,
.quick-group-assignment h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.photo-metadata {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.photo-metadata div {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.photo-metadata strong {
    color: var(--text-secondary);
    min-width: 100px;
}

.recent-plates {
    margin-bottom: 1rem;
}

.recent-plates label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.recent-plates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.plate-chip {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    color: var(--text-primary);
}

.plate-chip:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

.plate-chip.selected {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.quick-group-assignment .form-group {
    margin-bottom: 1rem;
}

.quick-group-assignment .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.quick-group-assignment .form-group input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
    text-transform: uppercase;
}

.quick-group-assignment .form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.button-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.button-group button {
    flex: 1;
}

.quick-group-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.quick-group-navigation button {
    flex: 1;
}

.quick-group-navigation span {
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.btn-accent {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive for Quick Group */
@media (max-width: 768px) {
    .quick-group-content {
        flex-direction: column;
    }
    
    .quick-group-image {
        flex: 1;
        padding: 1rem;
    }
    
    .quick-group-sidebar {
        width: 100%;
        max-height: 40vh;
        padding: 1rem;
    }
    
    .quick-group-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
}


.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* Group Tooltips and Context Menu */
.photo-groups-badge {
    cursor: help;
    color: var(--accent-primary);
    text-decoration: underline dotted;
    font-size: 0.85rem;
}

.photo-groups-badge:hover {
    color: var(--accent-hover);
}

.group-tooltip {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 10000;
    min-width: 200px;
    max-width: 300px;
    pointer-events: auto;
}

.group-tooltip-header {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.group-tooltip-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.group-tooltip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    transition: background 0.2s;
    cursor: pointer;
}

.group-tooltip-item:hover {
    background: var(--bg-hover);
}

.group-tooltip-item strong {
    color: var(--text-primary);
}

.group-tooltip-item .hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.context-menu {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 10001;
    min-width: 180px;
}

.context-menu-header {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.25rem;
}

.context-menu-item {
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    color: var(--text-primary);
}

.context-menu-item:hover {
    background: var(--accent-primary);
    color: white;
}

/* Plate Preview Tooltip */
.plate-preview-tooltip {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    max-width: 300px;
    pointer-events: auto;
}

.plate-preview-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.plate-preview-thumb .no-preview {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
}

.plate-preview-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.plate-preview-info strong {
    color: var(--accent-primary);
    font-size: 1rem;
}

.plate-preview-count {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
