/* Photo Backup - Custom Styles */

/* Layout */
:root {
    --sidebar-width: 250px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    z-index: 1000;
    transition: transform 0.3s;
    overflow-y: auto;
}

.sidebar .nav-link {
    border-radius: 8px;
    padding: 10px 16px;
    transition: background 0.2s;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background: rgba(37, 99, 235, 0.8);
    color: #fff !important;
}

/* Main content area */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 24px;
    min-height: 100vh;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
        padding-top: 70px;
    }
}

/* Auth pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-card .card-body {
    padding: 2.5rem;
}

/* Stat cards */
.stat-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.gallery-item {
    border-radius: 12px;
    overflow: visible;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
}

.gallery-item .file-select {
    cursor: pointer;
    z-index: 3;
}

.gallery-item .file-select .form-check-input {
    width: 1.2em;
    height: 1.2em;
    cursor: pointer;
    background-color: rgba(255,255,255,0.85);
    border: 2px solid #ccc;
}

.gallery-item .file-select .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}

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

.gallery-item .thumb {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.gallery-item .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover .thumb img {
    transform: scale(1.05);
}

.gallery-item .thumb .doc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    color: #6b7280;
    background: #f9fafb;
}

.gallery-item .item-info {
    padding: 12px;
}

.gallery-item .item-info .filename {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item .item-info .meta {
    font-size: 0.75rem;
    color: #9ca3af;
}

.gallery-item .item-actions {
    padding: 0 12px 12px;
    display: flex;
    gap: 6px;
}

/* Upload drop zone */
.drop-zone {
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: border-color 0.3s, background 0.3s;
    cursor: pointer;
    background: #fafbfc;
}

.drop-zone.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

.drop-zone .drop-icon {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.drop-zone.dragover .drop-icon {
    color: #2563eb;
}

/* Image preview modal */
.preview-modal .modal-body {
    padding: 0;
    background: #000;
}

.preview-modal .modal-body img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

/* File list table */
.files-table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.files-table td {
    vertical-align: middle;
}

/* Upload progress */
.upload-progress {
    display: none;
}

.upload-progress.active {
    display: block;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Admin table */
.admin-table .table {
    border-radius: 12px;
    overflow: hidden;
}

.admin-table .table thead {
    background: #f9fafb;
}
