* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8edf2 100%);
    color: #333;
    min-height: 100vh;
    line-height: 1.6;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 15px;
    padding-bottom: 100px;
}

.header {
    background: linear-gradient(135deg, #1b4d3e 0%, #2d6a4f 100%);
    color: white;
    padding: 25px 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(27, 77, 62, 0.2);
    text-align: center;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.logo-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #d4af37;
    background: white;
    padding: 5px;
}

.logo-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #d4af37;
}

.logo-subtitle {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.9;
}

.logo-tagline {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    color: #d4af37;
    margin-top: 4px;
}

.nav-tabs {
    display: flex;
    gap: 6px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    flex: 1;
    min-width: 80px;
    background: transparent;
    border: none;
    padding: 10px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    position: relative;
    color: #666;
    font-size: 11px;
    font-weight: 500;
}

.nav-tab:hover {
    background: #f5f7fa;
}

.nav-tab.active {
    background: linear-gradient(135deg, #1b4d3e 0%, #2d6a4f 100%);
    color: white;
}

.tab-icon {
    font-size: 20px;
}

.tab-text {
    font-size: 11px;
}

.tab-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #d4af37;
    color: #1b4d3e;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.view-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    color: #1b4d3e;
    font-size: 24px;
    margin-bottom: 5px;
}

.date-display, .week-display {
    color: #666;
    font-size: 14px;
    text-transform: capitalize;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card h2, .card h3 {
    color: #1b4d3e;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
}

.quick-notes-card textarea {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    resize: vertical;
    transition: all 0.2s ease;
    background: #fafafa;
}

.quick-notes-card textarea:focus {
    outline: none;
    border-color: #1b4d3e;
    box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.1);
    background: white;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #444;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1b4d3e;
    box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.1);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 12px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Roboto', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #1b4d3e 0%, #2d6a4f 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 77, 62, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-pdf {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: white;
    margin-top: 10px;
}

.btn-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-copy {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
    color: white !important;
}

.btn-copy:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.appointment-item {
    background: white;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #1b4d3e;
    transition: all 0.2s ease;
}

.appointment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.appointment-item.past {
    opacity: 0.7;
    border-left-color: #999;
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.appointment-name {
    font-size: 17px;
    font-weight: 600;
    color: #1b4d3e;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.appointment-date {
    font-size: 13px;
    color: #666;
}

.appointment-details {
    font-size: 14px;
    color: #555;
    margin: 10px 0;
    line-height: 1.7;
}

.appointment-price {
    font-size: 20px;
    font-weight: 700;
    color: #d4af37;
    margin: 10px 0;
}

.appointment-notes {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    margin: 10px 0;
    border-left: 3px solid #d4af37;
}

.appointment-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.appointment-actions .btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 8px;
    font-size: 12px;
}

.payment-badge {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-paid {
    background: #d4edda;
    color: #155724;
}

.payment-pending {
    background: #fff3cd;
    color: #856404;
}

.payment-partial {
    background: #ffe5d0;
    color: #a0522d;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-top: 4px solid #d4af37;
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #1b4d3e;
    margin-bottom: 5px;
}

.stat-subtitle {
    font-size: 12px;
    color: #888;
}

.monthly-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.month-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 3px solid #1b4d3e;
}

.month-name {
    font-weight: 500;
    color: #333;
    text-transform: capitalize;
}

.month-amount {
    font-weight: 700;
    color: #d4af37;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 15px;
}

.info-text {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 25px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    color: #1b4d3e;
    margin-bottom: 12px;
    font-family: 'Playfair Display', serif;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 999;
    max-width: 90%;
}

.install-prompt.hidden {
    display: none;
}

.install-prompt p {
    font-size: 14px;
    color: #333;
    margin: 0;
}

@media (max-width: 600px) {
    .app-container {
        padding: 10px;
    }

    .header {
        padding: 20px 15px;
    }

    .logo-title {
        font-size: 22px;
    }

    .logo-image {
        width: 65px;
        height: 65px;
    }

    .nav-tab {
        min-width: 65px;
        padding: 8px 5px;
    }

    .tab-icon {
        font-size: 18px;
    }

    .tab-text {
        font-size: 10px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .appointment-actions {
        flex-direction: column;
    }

    .appointment-actions .btn {
        width: 100%;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 22px;
    }

    .appointment-header {
        flex-direction: column;
    }
}