
/* ========================================
   BLACK PRO STUDIO - PREMIUM DESIGN
   Version 2.1 - Enhanced Edition
   ======================================== */

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

:root {
    --bg-primary: #0d0d0d;
    --bg-card: #1a1a1a;
    --text-gold: #FFD700;
    --text-white: #ffffff;
    --text-gray: #b0b0b0;
    --positive: #00ff88;
    --negative: #ff4444;
    --neutral: #888888;
    --shadow: rgba(0, 0, 0, 0.5);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-white);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========================================
   PWA BANNERS
   ======================================== */

.install-banner {
    position: sticky;
    top: 0;
    z-index: 1001;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: var(--bg-primary);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    animation: slideDown 0.5s ease;
}

.install-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.install-icon {
    font-size: 2rem;
}

.install-text p {
    margin: 0;
    line-height: 1.4;
}

.install-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-install {
    background: var(--bg-primary);
    color: var(--text-gold);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-install-close {
    background: none;
    border: none;
    color: var(--bg-primary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-install-close:hover {
    transform: scale(1.2);
}

.update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    background: #4169E1;
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(65, 105, 225, 0.3);
    animation: slideDown 0.5s ease;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.update-icon {
    font-size: 1.5rem;
}

.banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-update {
    background: white;
    color: #4169E1;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-update-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-update-close:hover {
    transform: scale(1.2);
}

/* ========================================
   AUTOSAVE NOTIFICATION
   ======================================== */

.autosave-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--bg-card);
    color: var(--text-gold);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--shadow);
    border-left: 4px solid var(--text-gold);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3000;
    font-size: 0.9rem;
    font-weight: 600;
}

.autosave-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* ========================================
   HEADER
   ======================================== */

.header {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    color: var(--text-gold);
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.header-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    background: transparent;
    color: var(--text-gray);
    border: 1px solid transparent;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    min-height: 44px;
}

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

.nav-btn.active {
    background: var(--text-gold);
    color: var(--bg-primary);
    border-color: var(--text-gold);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-backup {
    background: var(--bg-card);
    color: var(--text-gold);
    border: 1px solid var(--text-gold);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    min-height: 44px;
}

.btn-backup:hover {
    background: var(--text-gold);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* ========================================
   CONTAINER
   ======================================== */

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

/* ========================================
   CARDS DE RESUMO
   ======================================== */

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 8px 24px var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--shadow);
}

.summary-cards .card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.card-content h3 {
    color: var(--text-gold);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-value {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    font-weight: 700;
}

.card-value.positive {
    color: var(--positive);
}

.card-value.negative {
    color: var(--negative);
}

.card-value.neutral {
    color: var(--neutral);
}

/* Color coding for negative values */
.value-negative {
    color: var(--negative) !important;
}

.value-positive {
    color: var(--positive) !important;
}

/* ========================================
   PROJEÇÃO MENSAL
   ======================================== */

.projection-section {
    margin: 2rem 0;
}

.projection-section .card {
    text-align: center;
}

.projection-section h3 {
    color: var(--text-gold);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.projection-value {
    font-size: clamp(2rem, 6vw, 2.5rem);
    font-weight: 700;
    color: var(--positive);
    margin: 1rem 0;
}

.projection-info {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.projection-warning {
    background: rgba(255, 68, 68, 0.1);
    color: var(--negative);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid var(--negative);
    font-weight: 600;
}

/* ========================================
   FORMULÁRIOS
   ======================================== */

.forms-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.form-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 8px 24px var(--shadow);
}

.form-card h3 {
    color: var(--text-gold);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

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

.input-with-icon {
    position: relative;
    display: block;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    font-size: 1.1rem;
    opacity: 0.7;
    pointer-events: none;
    color: var(--text-gold);
}

.input-with-icon input {
    padding-left: 3.2rem !important;
    position: relative;
    z-index: 1;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-primary);
    border: 1px solid #333;
    border-radius: 8px;
    color: var(--text-white);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-gold);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.1);
}

.form-group textarea {
    font-family: inherit;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--text-gold) 0%, #FFA500 100%);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    min-height: 44px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ========================================
   CHARTS SECTION
   ======================================== */

.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

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

.chart-header h3 {
    color: var(--text-gold);
    font-size: 1.3rem;
}

.chart-subtitle {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.chart-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    color: var(--text-gray);
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    min-height: 44px;
}

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

.filter-btn.active {
    background: var(--text-gold);
    color: var(--bg-primary);
    border-color: var(--text-gold);
}

.chart-container {
    position: relative;
    height: 400px;
    padding: 1rem;
    overflow-x: auto;
}

#dailyChart,
#monthlyChart {
    max-width: 100%;
    height: auto;
}

/* ========================================
   TOP SERVIÇOS
   ======================================== */

.top-services-section {
    margin: 2rem 0;
}

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

.section-header h3 {
    color: var(--text-gold);
    font-size: 1.3rem;
}

.link-see-all {
    color: var(--text-gold);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 4px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.link-see-all:hover {
    text-decoration: underline;
    background: rgba(255, 215, 0, 0.1);
}

.top-services-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    transition: var(--transition);
}

.service-item:hover {
    background: #252525;
    transform: translateX(4px);
}

.service-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.service-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-gold);
    min-width: 40px;
    text-align: center;
}

.service-details {
    flex: 1;
}

.service-details h4 {
    color: var(--text-white);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.service-details p {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.service-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--positive);
}

/* ========================================
   LISTA DE ATENDIMENTOS
   ======================================== */

.appointments-section {
    margin: 2rem 0 4rem;
}

.appointments-section h3 {
    color: var(--text-gold);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.appointment-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1.2rem;
    background: var(--bg-primary);
    border-radius: 8px;
    transition: var(--transition);
}

.appointment-item:hover {
    background: #252525;
    transform: translateX(4px);
}

.appointment-date {
    color: var(--text-gold);
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

.appointment-info h4 {
    color: var(--text-white);
    font-size: 1rem;
    margin-bottom: 0.3rem;
    cursor: pointer;
    transition: var(--transition);
}

.appointment-info h4:hover {
    color: var(--text-gold);
}

.appointment-info p {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.appointment-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--positive);
}

.btn-delete {
    padding: 0.5rem 1rem;
    background: var(--negative);
    color: var(--text-white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    min-height: 44px;
}

.btn-delete:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

.empty-message {
    text-align: center;
    color: var(--text-gray);
    padding: 2rem;
    font-style: italic;
}

/* ========================================
   MODAL
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.modal-header h3 {
    color: var(--text-gold);
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-gold);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    min-height: 44px;
    min-width: 44px;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.cliente-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    color: var(--text-gold);
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-appointments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-appointment-item {
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
}

.modal-appointment-item h4 {
    color: var(--text-white);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.modal-appointment-item p {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.modal-appointment-item .value {
    color: var(--positive);
    font-weight: 700;
}

.services-full-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-secondary {
    flex: 1;
    padding: 1rem;
    background: var(--bg-primary);
    color: var(--text-white);
    border: 1px solid #333;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
    min-height: 44px;
}

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

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--bg-card);
    padding: 2rem;
    text-align: center;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-top: 4rem;
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    color: var(--text-white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 8px 24px var(--shadow);
    transform: translateY(150px);
    opacity: 0;
    transition: var(--transition);
    z-index: 2000;
    max-width: 350px;
    border-left: 4px solid var(--text-gold);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ========================================
   REMINDER BANNER
   ======================================== */

.reminder-banner {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: var(--bg-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    animation: slideDown 0.5s ease;
}

.banner-icon {
    font-size: 2rem;
}

.banner-content {
    flex: 1;
}

.banner-content p {
    font-weight: 600;
    margin: 0;
}

.banner-close {
    background: none;
    border: none;
    color: var(--bg-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px;
    min-width: 44px;
}

.banner-close:hover {
    transform: scale(1.2);
}

/* ========================================
   DAILY SUMMARY
   ======================================== */

.daily-summary-section {
    margin: 2rem 0;
}

.daily-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.daily-stat {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
}

.daily-stat .stat-label {
    color: var(--text-gold);
    font-size: 0.85rem;
    font-weight: 600;
}

.daily-stat .stat-value {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 700;
}

/* ========================================
   GOAL SECTION
   ======================================== */

.goal-section {
    margin: 2rem 0;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.goal-header h3 {
    color: var(--text-gold);
    font-size: 1.2rem;
}

.btn-edit-goal {
    background: transparent;
    color: var(--text-gold);
    border: 1px solid var(--text-gold);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    min-height: 44px;
}

.btn-edit-goal:hover {
    background: var(--text-gold);
    color: var(--bg-primary);
}

.goal-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.goal-input-group input {
    flex: 1;
    padding: 0.8rem;
    background: var(--bg-primary);
    border: 1px solid #333;
    border-radius: 8px;
    color: var(--text-white);
    font-size: 1rem;
    min-width: 200px;
}

.btn-save-goal {
    padding: 0.8rem 1.5rem;
    background: var(--text-gold);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    min-height: 44px;
}

.btn-save-goal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.goal-value {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    font-weight: 700;
    color: var(--text-gold);
    margin-bottom: 1rem;
    text-align: center;
}

.goal-progress-container {
    width: 100%;
    height: 30px;
    background: var(--bg-primary);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.goal-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.goal-percentage {
    text-align: center;
    color: var(--text-gold);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.goal-feedback {
    text-align: center;
    color: var(--positive);
    font-size: 0.95rem;
    font-weight: 600;
    font-style: italic;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(0, 255, 136, 0.1);
}

/* ========================================
   INSIGHTS SECTION
   ======================================== */

.insights-section {
    margin: 2rem 0;
}

.insights-section h3 {
    color: var(--text-gold);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.insights-content {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.insight-item {
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    color: var(--text-white);
    line-height: 1.6;
}

/* ========================================
   TOP CLIENTS (MINI-CRM)
   ======================================== */

.top-clients-section {
    margin: 2rem 0;
}

.top-clients-section h3 {
    color: var(--text-gold);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.top-clients-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.client-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.client-item:hover {
    background: #252525;
    transform: translateX(4px);
}

.client-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.client-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-gold);
    min-width: 40px;
    text-align: center;
}

.client-details {
    flex: 1;
}

.client-details h4 {
    color: var(--text-white);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.client-details p {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.client-stats {
    text-align: right;
}

.client-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--positive);
}

.client-visits {
    color: var(--text-gray);
    font-size: 0.85rem;
}

/* ========================================
   AGENDA VIEW
   ======================================== */

.view-content {
    width: 100%;
}

.agenda-header-section {
    margin: 2rem 0 1rem;
}

.agenda-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.agenda-controls h3 {
    color: var(--text-gold);
    font-size: 1.3rem;
}

.view-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-primary);
    padding: 0.25rem;
    border-radius: 6px;
}

.view-toggle-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-gray);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    min-height: 44px;
}

.view-toggle-btn:hover {
    color: var(--text-gold);
}

.view-toggle-btn.active {
    background: var(--text-gold);
    color: var(--bg-primary);
}

.date-navigation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-nav {
    padding: 0.5rem 0.8rem;
    background: var(--bg-primary);
    color: var(--text-gold);
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    min-height: 44px;
    min-width: 44px;
}

.btn-nav:hover {
    border-color: var(--text-gold);
    transform: scale(1.1);
}

.btn-today {
    padding: 0.5rem 1rem;
    background: var(--text-gold);
    color: var(--bg-primary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    min-height: 44px;
}

.btn-today:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.current-date-display {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    color: var(--text-white);
    border-radius: 6px;
    font-weight: 600;
    min-width: 150px;
    text-align: center;
}

.btn-new-appointment {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--text-gold) 0%, #FFA500 100%);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: var(--transition);
    margin-left: auto;
    min-height: 44px;
}

.btn-new-appointment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.agenda-counter {
    padding: 0.8rem;
    background: var(--bg-primary);
    border-radius: 8px;
    text-align: center;
}

.agenda-counter p {
    color: var(--text-gold);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.agenda-slots-section {
    margin: 1rem 0 4rem;
}

.agenda-slots-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.time-slot {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    transition: var(--transition);
}

.time-slot:hover {
    background: #252525;
}

.time-slot-time {
    color: var(--text-gold);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
}

.time-slot-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.time-slot-empty {
    color: var(--text-gray);
    font-style: italic;
}

.appointment-card {
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    border-left: 4px solid;
    cursor: pointer;
    transition: var(--transition);
}

.appointment-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px var(--shadow);
}

.appointment-card.status-pending {
    border-color: #FFA500;
}

.appointment-card.status-confirmed {
    border-color: var(--positive);
}

.appointment-card.status-completed {
    border-color: #4169E1;
}

.appointment-card.status-noshow {
    border-color: var(--negative);
}

.appointment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.appointment-card-client {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
}

.appointment-card-status {
    font-size: 0.85rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
}

.appointment-card-body p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

.appointment-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.btn-whatsapp {
    padding: 0.4rem 0.8rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 44px;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.btn-complete {
    padding: 0.4rem 0.8rem;
    background: var(--positive);
    color: var(--bg-primary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    min-height: 44px;
}

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

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .forms-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 1.4rem;
    }

    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .header-nav {
        order: -1;
        width: 100%;
        justify-content: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .summary-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .daily-summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .chart-filters {
        width: 100%;
        justify-content: center;
    }

    .appointment-item {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        text-align: center;
    }

    .appointment-date {
        text-align: center;
    }

    .cliente-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .toast {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }

    .agenda-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .agenda-controls h3 {
        text-align: center;
    }

    .view-toggle,
    .date-navigation {
        justify-content: center;
    }

    .btn-new-appointment {
        margin-left: 0;
        width: 100%;
    }

    .time-slot {
        grid-template-columns: 60px 1fr;
        gap: 0.5rem;
    }

    .appointment-card-actions {
        flex-direction: column;
    }

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

    .goal-header {
        flex-direction: column;
        align-items: stretch;
    }

    .goal-input-group {
        flex-direction: column;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.8rem;
    }

    .header {
        padding: 1rem 0;
    }

    .header-actions {
        gap: 0.25rem;
    }

    .btn-backup {
        flex: 1;
        font-size: 0.8rem;
        padding: 0.5rem 0.6rem;
    }

    /* Banner mobile improvements (Fix #3) */
    .reminder-banner {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .banner-close {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .install-banner {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .install-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-install-close {
        min-width: 44px;
        min-height: 44px;
    }

    /* Financial cards improvements with better color coding (Fix #3) */
    .summary-cards,
    .daily-summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-value,
    .projection-value,
    .card-value {
        font-size: 1.3rem;
        line-height: 1.2;
        word-break: break-word;
        hyphens: auto;
    }
    
    /* Ensure negative values are always red (Fix #3) */
    .stat-value.negative,
    .projection-value.negative,
    .card-value.negative {
        color: var(--negative) !important;
    }
    
    .stat-value.positive,
    .projection-value.positive,
    .card-value.positive {
        color: var(--positive) !important;
    }
    
    /* Chart container mobile improvements (Fix #3) */
    .chart-container {
        height: 300px;
        padding: 0.5rem;
        overflow-x: visible;
    }
    
    #dailyChart,
    #monthlyChart {
        width: 100% !important;
        height: auto !important;
    }
    
    /* Enhanced input field icon spacing for mobile (Fix #2) */
    .input-with-icon input {
        padding-left: 3.5rem !important;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Touch-friendly elements */
    .btn-primary,
    .filter-btn,
    .nav-btn {
        min-height: 44px;
        touch-action: manipulation;
    }

    .card-value {
        font-size: 1.3rem;
    }

    .projection-value {
        font-size: 1.8rem;
    }

    .goal-value {
        font-size: 1.4rem;
    }

    .current-date-display {
        min-width: 120px;
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
    }

    .form-card {
        padding: 1.5rem;
    }

    .chart-container {
        padding: 0.5rem;
        height: 300px;
    }

    .service-item,
    .client-item {
        padding: 0.8rem;
    }

    .service-info,
    .client-info {
        gap: 0.8rem;
    }

    .service-details h4,
    .client-details h4 {
        font-size: 0.9rem;
    }

    .service-details p,
    .client-details p {
        font-size: 0.8rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .install-banner,
    .update-banner {
        padding: 0.8rem 1rem;
    }

    .install-content,
    .banner-content {
        gap: 0.8rem;
    }

    .install-text p {
        font-size: 0.9rem;
    }

    .btn-install,
    .btn-update {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --bg-card: #1a1a1a;
        --text-white: #ffffff;
        --text-gold: #ffff00;
        --positive: #00ff00;
        --negative: #ff0000;
    }
}

/* Focus indicators for keyboard navigation */
button:focus,
input:focus,
select:focus,
textarea:focus,
.nav-btn:focus,
.btn-backup:focus {
    outline: 2px solid var(--text-gold);
    outline-offset: 2px;
}

/* ========================================
   HTML5 INPUT ENHANCEMENTS (v2.1.2)
   ======================================== */

/* Date and time input styling */
input[type="date"],
input[type="time"] {
    color: var(--text-white);
    background: var(--bg-primary);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 0.8rem;
    font-size: 1rem;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    background-color: var(--text-gold);
    border-radius: 3px;
    cursor: pointer;
    filter: invert(1);
}

input[type="date"]::-webkit-inner-spin-button,
input[type="time"]::-webkit-inner-spin-button {
    display: none;
}

input[type="date"]::-webkit-clear-button,
input[type="time"]::-webkit-clear-button {
    display: none;
}

/* Currency input styling - maintain existing input styles */
input[inputmode="decimal"] {
    text-align: right;
    font-weight: 600;
}

/* Mobile optimizations for native inputs */
@media screen and (max-width: 480px) {
    input[type="date"],
    input[type="time"] {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.9rem;
    }
    
    input[type="date"]::-webkit-calendar-picker-indicator,
    input[type="time"]::-webkit-calendar-picker-indicator {
        width: 20px;
        height: 20px;
    }
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
