/* A2GPhotos Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.nav-brand .tagline {
    font-size: 0.875rem;
    color: #666;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-email {
    color: #666;
    font-size: 0.875rem;
}

.nav-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #764ba2;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
}

.auth-card h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.auth-card .subtitle {
    color: #666;
    margin-bottom: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    color: #666;
    font-size: 0.875rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.form-footer {
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

/* Dashboard */
.dashboard {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #4285F4, #34A853, #FBBC05, #EA4335);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.google-status {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.google-status.connected {
    background: #d1fae5;
    color: #065f46;
}

.google-status.disconnected {
    background: #fef3c7;
    color: #92400e;
}

.help-text {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.album-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.album-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.album-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.album-header h4 {
    color: #333;
    font-size: 1.125rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-idle {
    background: #e0e0e0;
    color: #666;
}

.status-syncing {
    background: #bfdbfe;
    color: #1e40af;
}

.status-error {
    background: #fecaca;
    color: #991b1b;
}

.album-info {
    margin-bottom: 1rem;
}

.album-info p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.album-actions {
    display: flex;
    gap: 0.75rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading,
.error {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    color: #667eea;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal form {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.modal-body {
    padding: 1.5rem;
}

/* Tier Info Modal Styles */
.tier-info h4 {
    color: #333;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.tier-info .feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.tier-info .feature-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.tier-info .feature-list li:last-child {
    border-bottom: none;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
    border: 2px solid transparent;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.alert-error,
.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.alert-message {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #6366f1;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    margin-top: 3rem;
    padding: 2rem 0;
    text-align: center;
    color: #666;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    max-width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

.table th {
    font-weight: 600;
    color: #666;
    background: #f9fafb;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.table td:first-child {
    white-space: normal;
    min-width: 200px;
}

.table tr:hover {
    background-color: #f9fafb;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.bg-success {
    background: #d1fae5;
    color: #065f46;
}

.bg-warning {
    background: #fef3c7;
    color: #92400e;
}

.bg-danger {
    background: #fee2e2;
    color: #991b1b;
}

.bg-secondary {
    background: #e5e7eb;
    color: #374151;
}

.bg-info {
    background: #dbeafe;
    color: #1e40af;
}

.bg-light {
    background: #f3f4f6;
    color: #1f2937;
}

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

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

.justify-content-between {
    justify-content: space-between;
}

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

.gap-2 {
    gap: 0.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.ms-1 {
    margin-left: 0.25rem;
}

.w-auto {
    width: auto;
}

.w-100 {
    width: 100%;
}

.flex-grow-1 {
    flex-grow: 1;
}

.me-2 {
    margin-right: 0.5rem;
}

.text-muted {
    color: #6b7280;
}

.small {
    font-size: 0.875rem;
}

.fw-bold {
    font-weight: 600;
}

/* Admin Specific */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.btn-group {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
}

.btn-group .btn {
    border-radius: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-group .btn:last-child {
    border-right: none;
}

.btn-outline-primary {
    border: 1px solid #667eea;
    color: #667eea;
    background: transparent;
}

.btn-outline-primary.active,
.btn-outline-primary:hover {
    background: #667eea;
    color: white;
}

.btn-outline-success {
    border: 1px solid #10b981;
    color: #10b981;
    background: transparent;
}

.btn-outline-success.active,
.btn-outline-success:hover {
    background: #10b981;
    color: white;
}

.btn-outline-warning {
    border: 1px solid #f59e0b;
    color: #f59e0b;
    background: transparent;
}

.btn-outline-warning.active,
.btn-outline-warning:hover {
    background: #f59e0b;
    color: white;
}

.btn-outline-danger {
    border: 1px solid #ef4444;
    color: #ef4444;
    background: transparent;
}

.btn-outline-danger.active,
.btn-outline-danger:hover {
    background: #ef4444;
    color: white;
}

/* Form Controls */
.form-control,
.form-select {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.form-label {
    font-weight: 500;
    color: #374151;
}

.form-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* Navbar Stacking */
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: row;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-brand {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    /* Dashboard Header Stacking */
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .admin-header>div {
        width: 100%;
    }

    /* Ensure badges and buttons wrap */
    .admin-header div[style*="display: flex"] {
        flex-wrap: wrap;
    }

    /* Adjust Albums Grid */
    .albums-grid {
        grid-template-columns: 1fr;
        /* Stack albums on mobile */
    }

    /* Adjust Modal width */
    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    /* Adjust table font size */
    .table {
        font-size: 0.8rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
    }
}