:root {
    --primary: #059669;
    --primary-hover: #047857;
    --primary-light: #ecfdf5;
    --dark: #064e3b;
    --text: #334155;
    --muted: #64748b;
    --bg-light: #f4fbf7;
    --white: #ffffff;
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #059669;
    --radius: 12px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font);
    background-color: var(--bg-light);
    color: var(--text);
    min-height: 100vh;
}

.auth-box {
    max-width: 420px;
    margin: 80px auto;
    background: var(--white);
    padding: 36px 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.logo-icon {
    font-size: 36px;
    display: inline-block;
    margin-bottom: 8px;
}

.auth-header h2 { font-size: 24px; color: var(--dark); font-weight: 800; }
.auth-header p { font-size: 14px; color: var(--muted); margin-top: 4px; }

.dashboard-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 270px;
    background: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-brand {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding-left: 8px;
}

.sidebar-menu { display: flex; flex-direction: column; gap: 6px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#user-email-display { 
    font-size: 12px; 
    color: var(--muted); 
    word-break: break-all;
    text-align: center;
    display: block;
}

.btn-logout {
    padding: 9px 14px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    font-size: 13px;
    color: var(--danger);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-logout:hover { background: #fee2e2; }

.main-content { flex: 1; padding: 40px 48px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.content-header { margin-bottom: 32px; }
.content-header h2 { font-size: 26px; color: var(--dark); font-weight: 800; }
.content-header p { font-size: 14.5px; color: var(--muted); margin-top: 4px; }

.service-form-card {
    background: var(--white);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    margin-bottom: 32px;
}

.service-form-card h3 {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 20px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-bottom: 6px;
}

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

.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--dark);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field input[type="url"],
.form-field input[type="date"],
.form-field input[type="time"],
.form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.2s;
}

.form-field input:focus, .form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-field input[type="file"] {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    background: var(--bg-light);
    font-size: 13px;
    cursor: pointer;
}

.form-field input[type="file"]::file-selector-button {
    padding: 6px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.2s;
}

.form-field input[type="file"]::file-selector-button:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

.link-share-card {
    background: var(--white);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid var(--border);
    max-width: 620px;
}

.url-copy-box {
    display: flex;
    gap: 10px;
    margin: 14px 0 18px;
}

.url-copy-box input {
    flex: 1;
    padding: 12px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--bg-light);
    font-family: monospace;
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
}

.btn-secondary {
    padding: 10px 18px;
    background: var(--dark);
    color: var(--white);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.btn-outline-primary {
    display: inline-block;
    padding: 12px 18px;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-outline-primary:hover {
    background: var(--primary-light);
}

.bookings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.booking-card-item {
    background: var(--white);
    padding: 20px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.03);
    transition: all 0.2s ease;
}

.booking-card-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.booking-card-item h4 {
    font-size: 16px;
    color: var(--dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.booking-meta {
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.55;
    margin-bottom: 14px;
}

.booking-meta strong {
    color: var(--muted);
    font-weight: 600;
}

.booking-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.booking-phone:hover {
    background: #d1fae5;
}

.services-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.service-card-admin {
    background: var(--white);
    padding: 20px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.service-card-admin:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.service-card-admin h4 {
    font-size: 16px;
    color: var(--dark);
    margin-bottom: 6px;
    font-weight: 700;
}

.service-card-admin .booking-meta {
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: 14px;
}

.service-card-admin button {
    align-self: flex-start;
    padding: 7px 12px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--danger);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.service-card-admin button:hover {
    background: #fee2e2;
}

/* Vista Previa de Imágenes y Galería en Admin */
.gallery-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.thumb-preview-item {
    position: relative;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 110px;
}

.thumb-preview-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.btn-delete-thumb {
    width: 100%;
    padding: 4px 6px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: var(--danger);
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-delete-thumb:hover {
    background: #fee2e2;
}

.hidden { display: none !important; }

@media (max-width: 768px) {
    .dashboard-layout { flex-direction: column; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); position: relative; height: auto; }
    .main-content { padding: 24px 16px; }
}
