/* 
 * QuickSharePhotos - Admin Page Styles
 */

body.admin-page {
    background: #f5f3fc;
}

/* Login Page */
body.login-page {
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    max-width: 420px;
    width: 100%;
    background: white;
    padding: 44px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.3);
}

.login-container h1 {
    font-size: 1.3em;
    font-weight: 600;
    color: #1a1928;
    margin-bottom: 6px;
}

.login-container h2 {
    color: #5a5870;
    margin-bottom: 28px;
    font-weight: 400;
    font-size: 1.1em;
}

/* Form groups on login/register pages */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}
.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #dddde8;
    border-radius: 10px;
    font-size: 0.95em;
    font-family: inherit;
    background: #fafafe;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.10);
}

/* Login links */
.login-links {
    margin-top: 20px;
    text-align: center;
    color: #888;
    font-size: 0.92em;
}
.login-links a { color: #667eea; text-decoration: none; }
.login-links a:hover { text-decoration: underline; }

/* Inline messages on login/register */
.login-success {
    background: #eff8f0;
    color: #2d6a3f;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    border-left: 4px solid #48bb78;
    text-align: left;
    font-size: 0.92em;
}
.login-success p { margin: 0 0 6px; }
.login-success p:last-child { margin: 0; }

.login-error {
    background: #fff0f0;
    color: #b03030;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #e05050;
    text-align: left;
    font-size: 0.92em;
}

.login-container input[type="password"] { 
    width: 100%; 
    padding: 15px; 
    margin: 15px 0; 
    border: 2px solid #eee; 
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

.login-container input[type="password"]:focus {
    border-color: var(--primary-start);
    outline: none;
}

.login-container button,
.login-container .btn-primary {
    width: 100%;
    background: var(--primary-gradient);
    color: white;
    padding: 13px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    font-family: inherit;
    margin-top: 10px;
    transition: opacity 0.2s, transform 0.15s;
}

.login-container button:hover { 
    transform: translateY(-2px);
}

.login-container .error {
    color: var(--danger);
    margin-top: 10px;
    font-size: 14px;
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-start);
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Bulk Actions */
.bulk-actions {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.bulk-actions h3 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.btn-download {
    background: #28a745;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-download:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-download.disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Photo Grid (Admin version) */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.photo-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-5px);
}

.photo-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
}

.photo-card .photo-info {
    padding: 15px;
}

.photo-name {
    font-weight: 600;
    margin-bottom: 5px;
    word-break: break-all;
    font-size: 14px;
}

.photo-details {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.photo-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Rotate Controls (Admin) */
.admin-rotate-controls {
    display: flex;
    gap: 5px;
}

.admin-rotate-btn {
    background: var(--primary-start);
    color: white;
    border: none;
    border-radius: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.admin-rotate-btn:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

.admin-rotate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Image Container with Loading Overlay */
.image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-start);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.toast {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    max-width: 350px;
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast-message {
    flex: 1;
    font-size: 14px;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: #333;
}

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

/* No Photos State */
.no-photos {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-photos h2 {
    margin-bottom: 10px;
    color: #999;
}

/* Account Page */
.account-card {
    max-width: 520px;
    margin: 40px auto;
}
.account-card h2 {
    margin: 0 0 20px;
    color: #1a1928;
    font-size: 1.15em;
    font-weight: 600;
}
.account-details { margin-bottom: 28px; }
.account-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.95em;
}
.account-row:last-child { margin-bottom: 0; }
.account-label {
    color: #888;
    min-width: 60px;
    flex-shrink: 0;
}

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

    .stat-number {
        font-size: 2em;
    }

    .bulk-actions {
        flex-direction: column;
        text-align: center;
    }
}
