/* =============================================
   TEMA MOBILE APP — ÁREA DO PROFISSIONAL
   ============================================= */
:root {
    --bg:       #1c1c1e;
    --bg2:      #2c2c2e;
    --bg3:      #3a3a3c;
    --copper:   #c97b4b;
    --copper2:  #e09060;
    --text:     #f5f5f5;
    --text2:    #aeaeb2;
    --success:  #30d158;
    --danger:   #ff453a;
    --warning:  #ffd60a;
    --info:     #0a84ff;
    --radius:   16px;
    --radius-sm:10px;
    --nav-h:    68px;
    --header-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.4;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---- APP HEADER ---- */
.app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.app-header h1 { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.app-header p  { font-size: .8rem; color: var(--text2); margin-top: 1px; }
.app-header .header-actions { display: flex; gap: 10px; }
.header-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--bg2);
    border: none;
    color: var(--text2);
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    text-decoration: none;
}
.header-btn:hover { background: var(--bg3); color: var(--text); }

/* ---- MAIN CONTENT ---- */
.app-content {
    padding-top: calc(var(--header-h) + 16px);
    padding-bottom: calc(var(--nav-h) + 16px);
    padding-left: 16px;
    padding-right: 16px;
    min-height: 100vh;
}

/* ---- SECTION TITLE ---- */
.section-title {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin: 20px 0 10px;
}

/* ---- STAT CARDS (2 colunas) ---- */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}
.stat-card {
    border-radius: var(--radius);
    padding: 16px;
    position: relative;
    overflow: hidden;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.stat-card.copper {
    background: linear-gradient(135deg, #c97b4b 0%, #a85d30 100%);
    color: #fff;
}
.stat-card.dark {
    background: var(--bg2);
    color: var(--text);
}
.stat-card .sc-label { font-size: .78rem; opacity: .85; font-weight: 500; }
.stat-card .sc-amount { font-size: .85rem; opacity: .9; margin-top: 4px; }
.stat-card .sc-value { font-size: 2.4rem; font-weight: 700; line-height: 1; margin-top: 8px; }
.stat-card .sc-icon {
    position: absolute; bottom: 10px; right: 12px;
    font-size: 2.2rem; opacity: .15;
}
.stat-card.full { grid-column: 1 / -1; min-height: 80px; flex-direction: row; align-items: center; justify-content: space-between; }
.stat-card.full .sc-value { font-size: 1.8rem; }

/* ---- DATE NAV ---- */
.date-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 12px;
}
.date-nav .dn-label { font-size: .9rem; font-weight: 600; }
.date-nav .dn-btn {
    background: none; border: none; color: var(--text2);
    font-size: 1.2rem; cursor: pointer; padding: 4px 8px;
    border-radius: 8px;
}
.date-nav .dn-btn:active { background: var(--bg3); }

/* ---- WEEK STRIP ---- */
.week-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 16px;
    padding-bottom: 2px;
}
.week-strip::-webkit-scrollbar { display: none; }
.day-pill {
    flex: 1;
    min-width: 42px;
    text-align: center;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    background: var(--bg2);
    cursor: pointer;
    transition: background .15s;
}
.day-pill .dp-name { font-size: .65rem; color: var(--text2); text-transform: uppercase; }
.day-pill .dp-num  { font-size: 1rem; font-weight: 700; margin-top: 2px; }
.day-pill.active   { background: var(--copper); color: #fff; }
.day-pill.active .dp-name { color: rgba(255,255,255,.8); }
.day-pill .dp-dot  { width: 5px; height: 5px; border-radius: 50%; background: var(--copper); margin: 4px auto 0; }
.day-pill.active .dp-dot { background: #fff; }

/* ---- CARDS GENÉRICOS ---- */
.app-card {
    background: var(--bg2);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
}
.app-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.app-card-header .ach-title { font-size: .95rem; font-weight: 600; }
.app-card-header .ach-badge {
    background: var(--copper);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}
.app-card-header .ach-link {
    font-size: .78rem; color: var(--copper); text-decoration: none; font-weight: 500;
}

/* ---- APPOINTMENT ITEMS ---- */
.appt-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    text-decoration: none;
    color: var(--text);
    transition: background .1s;
}
.appt-item:last-child { border-bottom: none; }
.appt-item:active { background: rgba(255,255,255,.04); }
.appt-time-col { text-align: center; min-width: 44px; }
.appt-time-col .at-time { font-size: .78rem; font-weight: 600; color: var(--text); }
.appt-time-col .at-dur  { font-size: .68rem; color: var(--text2); margin-top: 2px; }
.appt-divider { width: 2px; height: 38px; border-radius: 2px; background: var(--copper); flex-shrink: 0; }
.appt-divider.scheduled  { background: var(--info); }
.appt-divider.confirmed  { background: var(--copper); }
.appt-divider.completed  { background: var(--success); }
.appt-divider.canceled   { background: var(--danger); }
.appt-info { flex: 1; }
.appt-info .ai-service  { font-size: .9rem; font-weight: 600; }
.appt-info .ai-client   { font-size: .78rem; color: var(--text2); margin-top: 2px; }
.appt-status {
    font-size: .68rem; font-weight: 600; padding: 3px 8px;
    border-radius: 20px; white-space: nowrap;
}
.appt-status.scheduled { background: rgba(10,132,255,.15); color: var(--info); }
.appt-status.confirmed { background: rgba(201,123,75,.15); color: var(--copper2); }
.appt-status.completed { background: rgba(48,209,88,.15); color: var(--success); }
.appt-status.canceled  { background: rgba(255,69,58,.15); color: var(--danger); }

/* ---- COMANDA ITEMS ---- */
.comanda-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.comanda-item:last-child { border-bottom: none; }
.ci-left .ci-num  { font-size: .75rem; color: var(--copper); font-weight: 700; }
.ci-left .ci-name { font-size: .9rem; font-weight: 600; margin-top: 2px; }
.ci-left .ci-svc  { font-size: .75rem; color: var(--text2); margin-top: 2px; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-right { text-align: right; }
.ci-right .ci-val  { font-size: .95rem; font-weight: 700; color: var(--copper); }
.ci-right .ci-time { font-size: .72rem; color: var(--text2); margin-bottom: 6px; }
.btn-conclude {
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    display: block;
}
.btn-conclude:active { opacity: .8; }

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--text2);
}
.empty-state i { font-size: 2rem; margin-bottom: 10px; display: block; }
.empty-state p { font-size: .85rem; }

/* ---- BOTTOM NAV ---- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: var(--bg2);
    border-top: 1px solid rgba(255,255,255,.07);
    display: flex;
    align-items: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text2);
    font-size: .58rem;
    font-weight: 500;
    padding: 6px 2px;
    position: relative;
    transition: color .15s;
    min-width: 0;
}
.bn-item i { font-size: 1.2rem; }
.bn-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bn-item.active { color: var(--copper); }
.bn-item .bn-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 18px);
    background: var(--danger);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
}

/* ---- FORMS / INPUTS ---- */
.app-form .form-group { margin-bottom: 14px; }
.app-form label { font-size: .78rem; color: var(--text2); display: block; margin-bottom: 5px; }
.app-form input,
.app-form textarea,
.app-form select {
    width: 100%;
    background: var(--bg3);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 12px 14px;
    font-size: .95rem;
    outline: none;
    -webkit-appearance: none;
}
.app-form input:focus,
.app-form textarea:focus,
.app-form select:focus { border-color: var(--copper); }
.app-form select option { background: var(--bg2); }

/* ---- BUTTONS ---- */
.btn-app {
    width: 100%;
    background: var(--copper);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: opacity .15s;
}
.btn-app:active { opacity: .85; }
.btn-app.secondary { background: var(--bg3); color: var(--text); }
.btn-app.danger { background: var(--danger); }
.btn-app.success { background: var(--success); }

/* ---- ALERT ---- */
.app-alert {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: .85rem;
    font-weight: 500;
}
.app-alert.success { background: rgba(48,209,88,.12); color: var(--success); border-left: 3px solid var(--success); }
.app-alert.danger  { background: rgba(255,69,58,.12);  color: var(--danger);  border-left: 3px solid var(--danger); }
.app-alert.warning { background: rgba(255,214,10,.12); color: var(--warning); border-left: 3px solid var(--warning); }

/* ---- AVATAR ---- */
.avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--copper);
    flex-shrink: 0;
}
.avatar-sm {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--copper);
    flex-shrink: 0;
}
.avatar-lg {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid var(--copper);
    flex-shrink: 0;
}

/* ---- PORTFOLIO GRID ---- */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.portfolio-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    aspect-ratio: 1;
    background: var(--bg3);
}
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portfolio-item .pi-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    padding: 8px;
}
.portfolio-item .pi-title { font-size: .75rem; font-weight: 600; }
.portfolio-item .pi-likes { font-size: .68rem; color: rgba(255,255,255,.7); }

/* ---- STARS ---- */
.stars { color: var(--warning); font-size: .9rem; }

/* ---- SCROLLABLE TABS ---- */
.scroll-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-bottom: 12px;
}
.scroll-tabs::-webkit-scrollbar { display: none; }
.stab {
    white-space: nowrap;
    padding: 7px 16px;
    border-radius: 20px;
    background: var(--bg2);
    color: var(--text2);
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
}
.stab.active { background: var(--copper); color: #fff; }

/* ---- LOGIN ---- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-logo { width: 80px; height: 80px; object-fit: contain; margin-bottom: 20px; border-radius: 18px; }
.login-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.login-sub   { font-size: .85rem; color: var(--text2); margin-bottom: 32px; }
.login-card  { width: 100%; max-width: 400px; }

/* ---- MODAL ---- */
.app-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 200;
    display: none;
    align-items: flex-end;
}
.app-modal-overlay.open { display: flex; }
.app-modal {
    background: var(--bg2);
    border-radius: var(--radius) var(--radius) 0 0;
    width: 100%;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    max-height: 85vh;
    overflow-y: auto;
}
.app-modal-handle {
    width: 36px; height: 4px;
    background: var(--bg3);
    border-radius: 2px;
    margin: 0 auto 16px;
}
.app-modal-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 16px; }

/* ---- UTILITIES ---- */
.text-copper { color: var(--copper); }
.text-muted  { color: var(--text2); }
.text-success{ color: var(--success); }
.text-danger { color: var(--danger); }
.fw-bold { font-weight: 700; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.p-16  { padding: 16px; }
.divider { height: 1px; background: rgba(255,255,255,.05); margin: 4px 0; }
