/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input, textarea, select {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --accent: #c9a44c;
    --accent-glow: rgba(201, 164, 76, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border: #2a2a2a;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

/* ===== APP CONTAINER ===== */
.app-container {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
    padding-bottom: 80px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

/* ===== SCREENS ===== */
.screen {
    display: none;
    padding: 20px 16px;
    animation: fadeInUp 0.4s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== LOGIN ===== */
#screen-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 24px;
}

#screen-login.active {
    display: flex;
}

.login-wrapper {
    width: 100%;
    text-align: center;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.login-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== ADMIN HEADER ===== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-top: 10px;
}

.admin-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.admin-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===== DASHBOARD CARDS ===== */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 10px;
    text-align: center;
}

.dash-card.accent {
    border-color: var(--accent);
    background: rgba(201, 164, 76, 0.08);
}

.dash-card-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.dash-card-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== SECTION BLOCK ===== */
.section-block {
    margin-bottom: 20px;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--accent);
    border-radius: 2px;
}

/* ===== APPOINTMENTS ===== */
.appointment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.appointment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.appt-time {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 42px;
}

.appt-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.appt-name {
    font-size: 0.82rem;
    font-weight: 600;
}

.appt-service {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.appt-status {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
}

.appt-status.confirmed {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

.appt-status.pending {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
}

/* ===== PROFILE EDIT ===== */
.profile-edit-section {
    position: relative;
    margin-bottom: 24px;
}

.edit-banner {
    width: 100%;
    height: 140px;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

.edit-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-overlay-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.72rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: var(--transition);
}

.edit-overlay-btn:hover {
    border-color: var(--accent);
}

.edit-overlay-btn.small {
    bottom: auto;
    right: auto;
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.7rem;
}

.edit-avatar {
    position: absolute;
    bottom: -30px;
    left: 16px;
    width: 70px;
    height: 70px;
}

.edit-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
}

/* ===== FORM ===== */
.form-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 40px;
}

.form-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: -6px;
}

.form-input {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.form-select {
    appearance: none;
    cursor: pointer;
}

.time-input {
    padding: 10px 12px;
    width: 100px;
    text-align: center;
}

/* ===== BUTTONS ===== */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-add {
    padding: 8px 16px;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-add:hover {
    transform: scale(1.05);
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.btn-icon:hover {
    border-color: var(--accent);
}

.btn-icon.delete:hover {
    border-color: var(--danger);
}

/* ===== ADMIN SERVICES ===== */
.admin-services-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-service-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.admin-service-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
}

.admin-service-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.admin-service-actions {
    display: flex;
    gap: 8px;
}

/* ===== ADMIN PORTFOLIO ===== */
.admin-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.admin-portfolio-item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.admin-portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
}

.admin-portfolio-item:hover .portfolio-delete-btn {
    opacity: 1;
}

/* ===== AGENDA ===== */
.agenda-day-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.agenda-day-selector::-webkit-scrollbar {
    display: none;
}

.agenda-day {
    flex: 1;
    min-width: 48px;
    padding: 10px 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agenda-day.active {
    border-color: var(--accent);
    background: rgba(201, 164, 76, 0.1);
}

.agenda-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.agenda-day-name {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
}

.agenda-day-num {
    font-size: 0.95rem;
    font-weight: 700;
    display: block;
    color: var(--text-primary);
}

.agenda-day.active .agenda-day-num {
    color: var(--accent);
}

/* Timeline */
.agenda-simple-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agenda-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
}

.agenda-card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.agenda-card-time {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
}

.agenda-card-duration {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.agenda-card-right {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agenda-card-name {
    font-size: 0.88rem;
    font-weight: 600;
}

.agenda-card-service {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.agenda-card-phone {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.agenda-empty-msg {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 16px;
}

/* ===== HORÁRIOS CONFIG ===== */
.horarios-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.horario-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.horario-day {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    font-weight: 500;
}

.horario-day .day-off {
    color: var(--text-muted);
}

.horario-times {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.horario-times.disabled {
    color: var(--danger);
    font-weight: 500;
    font-size: 0.78rem;
}

/* Toggle */
.toggle {
    position: relative;
    width: 36px;
    height: 20px;
    display: inline-block;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
    background: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

/* ===== BOTTOM NAVIGATION ===== */
.admin-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    display: flex;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 8px 0;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.nav-item.active {
    color: var(--accent);
}

.nav-item span {
    font-size: 0.6rem;
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 431px) {
    body {
        background: #050505;
    }

    .app-container {
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }
}
