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

:root {
    --gold: #c9a96e;
    --gold-light: #dfc49c;
    --dark: #1a1a1a;
    --darker: #111111;
    --text: #e0e0e0;
    --text-muted: #888;
    --white: #ffffff;
    --bg: #0d0d0d;
    --card-bg: #1a1a1a;
    --border: #333;
    --danger: #e74c3c;
    --success: #27ae60;
    --radius: 12px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
}

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

/* ===== HERO ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201, 169, 110, 0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.logo-icon {
    font-size: 3rem;
    color: var(--gold);
    display: block;
    margin-bottom: 10px;
}

.logo h1 {
    font-size: 4rem;
    color: var(--white);
    letter-spacing: 3px;
}

.logo h1 span {
    color: var(--gold);
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 300;
}

/* ===== ABOUT ===== */
.about {
    padding: 100px 0;
    text-align: center;
}

.about h2 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 20px;
}

.about>.container>p {
    max-width: 700px;
    margin: 0 auto 60px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 30px;
    transition: transform 0.3s, border-color 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature h3 {
    color: var(--white);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.feature p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== ACCESS SECTION ===== */
.access-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg) 0%, #111 100%);
}

.access-card {
    max-width: 500px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 50px 40px;
    text-align: center;
}

.access-header h2 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 10px;
}

.access-header p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.code-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.code-input {
    width: 58px;
    height: 68px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--darker);
    color: var(--white);
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.code-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(201, 169, 110, 0.2);
}

.code-input.filled {
    border-color: var(--gold-light);
}

.btn-access {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--gold), #b8943e);
    color: var(--dark);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-access:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 169, 110, 0.3);
}

.btn-access:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    margin-top: 15px;
    padding: 12px;
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    color: #e74c3c;
    font-size: 0.9rem;
}

/* ===== SERVICES ===== */
.services {
    padding: 100px 0;
    text-align: center;
}

.services h2 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 50px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 25px;
    transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
}

.service-img {
    font-size: 3rem;
    margin-bottom: 15px;
}

.service-card h3 {
    color: var(--white);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== FOOTER ===== */
footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-sub {
    margin-top: 5px;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* ===== GALLERY ===== */
.gallery-body {
    background: var(--bg);
}

.gallery-nav {
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--white);
    text-decoration: none;
}

.nav-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.client-name {
    color: var(--gold);
    font-weight: 500;
}

.btn-logout {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-logout:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.gallery-hero {
    text-align: center;
    padding: 80px 20px 40px;
}

.gallery-hero h1 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 10px;
}

.gallery-hero p {
    color: var(--text-muted);
}

.gallery-section {
    padding: 0 0 80px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}

.photo-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

.photo-wrapper img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .photo-overlay {
    opacity: 1;
}

.btn-zoom,
.btn-download {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
    backdrop-filter: blur(5px);
}

.btn-zoom:hover,
.btn-download:hover {
    background: var(--gold);
    color: var(--dark);
    border-color: var(--gold);
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1001;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--gold);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--gold);
    color: var(--dark);
    border-color: var(--gold);
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== EMPTY GALLERY ===== */
.empty-gallery {
    padding: 100px 0;
    text-align: center;
}

.empty-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-content h2 {
    color: var(--white);
    margin-bottom: 10px;
}

.empty-content p {
    color: var(--text-muted);
}

/* ===== ADMIN ===== */
.admin-body {
    background: var(--bg);
}

.admin-nav {
    background: rgba(13, 13, 13, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
}

.admin-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.admin-sidebar h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.drive-sync-card {
    margin-top: 28px;
    padding: 20px;
    background: var(--darker);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.drive-sync-card h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 6px;
}

.drive-sync-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 14px;
    line-height: 1.4;
}

.btn-sync-drive {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4285f4, #2a66c9);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-sync-drive:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.btn-sync-drive:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.drive-sync-status {
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
    min-height: 1.2em;
}

.drive-sync-status.ok {
    color: var(--success);
}

.drive-sync-status.err {
    color: var(--danger);
}

.drive-sync-status.loading {
    color: var(--gold);
}

.form-group {
    margin-bottom: 18px;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    background: var(--darker);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--white);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--gold);
}

.btn-generate {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold), #b8943e);
    color: var(--dark);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-generate:hover {
    transform: translateY(-2px);
}

.admin-main h2 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.clients-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.client-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.3s;
}

.client-card:hover {
    border-color: var(--gold);
}

.client-info h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.session-type {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(201, 169, 110, 0.15);
    color: var(--gold);
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.client-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.client-meta strong {
    color: var(--gold);
}

.client-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 8px 16px;
    min-width: 105px;
    height: 42px;

    background: rgba(39, 174, 96, 0.15);
    color: var(--success);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 18px;

    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;

    line-height: 1;
    white-space: nowrap;

    transition: all 0.3s;
    box-sizing: border-box;
}

.btn-upload:hover {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

.btn-portfolio {
    padding: 12px 22px;
    background: rgba(201, 169, 110, 0.15);
    color: var(--gold);
    border: 1px solid rgba(201, 169, 110, 0.4);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 125px;
}

.btn-portfolio:hover {
    background: var(--gold);
    color: var(--dark);
    border-color: var(--gold);
}

.btn-iframe {
    padding: 12px 16px;
    background: rgba(66,133,244,0.15);
    color: #4285f4;
    border: 1px solid rgba(66,133,244,0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-iframe:hover {
    background: #4285f4;
    color: #fff;
}

.public-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(66,133,244,0.15);
    color: #4285f4;
    border: 1px solid rgba(66,133,244,0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-public {
    padding: 8px 14px;
    background: rgba(136,136,136,0.12);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-public.is-public {
    background: rgba(66,133,244,0.15);
    color: #4285f4;
    border-color: rgba(66,133,244,0.3);
}

.btn-public:hover {
    opacity: 0.85;
}


.btn-toggle {
    padding: 8px 16px;
    background: rgba(39, 174, 96, 0.15);
    color: var(--success);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-toggle.deactivated {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
    border-color: rgba(231, 76, 60, 0.3);
}

.btn-toggle:hover {
    opacity: 0.8;
}

.btn-mail {
    padding: 8px 16px;
    background: rgba(201, 169, 110, 0.15);
    color: var(--gold);
    border: 1px solid rgba(201, 169, 110, 0.3);
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-mail:hover {
    background: var(--gold);
    color: var(--dark);
}

.btn-delete {
    padding: 8px 12px;
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

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

.empty-state {
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
}

/* ===== FLASH MESSAGES ===== */
.flash-messages {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 0;
}

.flash {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.flash-success {
    background: rgba(39, 174, 96, 0.15);
    border: 1px solid rgba(39, 174, 96, 0.3);
    color: var(--success);
}

.flash-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: var(--danger);
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.7;
}

.flash-close:hover {
    opacity: 1;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 13, 13, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.4s ease;
}

.loading-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 50px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.loading-box p {
    color: var(--white);
    margin-top: 20px;
    font-size: 1rem;
    font-weight: 500;
}

.loading-progress {
    width: 260px;
    height: 8px;
    background: var(--darker);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 25px;
}

.loading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), #b8943e);
    border-radius: 10px;
    transition: width 0.3s;
}

.loading-percent {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 8px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    border: 4px solid rgba(201, 169, 110, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== LOGIN ===== */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a2e 50%, #16213e 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 45px 35px;
    text-align: center;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.login-form {
    text-align: left;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold), #b8943e);
    color: var(--dark);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 10px;
}

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

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--gold);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }

    .code-input {
        width: 50px;
        height: 60px;
        font-size: 1.5rem;
    }

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

    .client-card {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .client-actions {
        flex-wrap: wrap;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .photo-wrapper img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .code-inputs {
        gap: 8px;
    }

    .code-input {
        width: 44px;
        height: 54px;
        font-size: 1.3rem;
    }

    .access-card {
        padding: 30px 20px;
    }

    .nav-info {
        gap: 10px;
    }

    .client-name {
        font-size: 0.85rem;
    }
}