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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-container {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    justify-content: center;
}

.phone-frame {
    width: 375px;
    height: 812px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 30px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    z-index: 10;
}

.app-container {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    border-radius: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

.app-container::-webkit-scrollbar {
    width: 0px;
}

.screen {
    min-height: 100%;
    padding: 50px 20px 80px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

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

.screen-header {
    margin-bottom: 24px;
}

.screen-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.screen-header p {
    font-size: 14px;
    color: #666;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.stat-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-chip {
    flex: 1;
    background: #f0f4ff;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.stat-chip .label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.stat-chip .value {
    font-size: 20px;
    font-weight: 700;
    color: #4f46e5;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: #f0f4ff;
    color: #4f46e5;
}

.btn-secondary:hover {
    background: #e0e7ff;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: #4f46e5;
}

.input-group textarea {
    min-height: 100px;
    resize: vertical;
}

.item-list {
    margin-top: 16px;
}

.item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.item-info p {
    font-size: 13px;
    color: #666;
}

.item-amount {
    font-size: 18px;
    font-weight: 700;
    color: #4f46e5;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-paid {
    background: #d1fae5;
    color: #065f46;
}

.badge-overdue {
    background: #fee2e2;
    color: #991b1b;
}

.suggestion-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.suggestion-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.suggestion-item p {
    font-size: 13px;
    opacity: 0.9;
}

.phone-navbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 24px;
    border-radius: 0 0 30px 30px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.2s;
    color: #9ca3af;
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

.nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
    color: #4f46e5;
    background: #f0f4ff;
}

.preview-info {
    max-width: 400px;
    color: white;
}

.preview-info h1 {
    font-size: 36px;
    margin-bottom: 8px;
}

.preview-info > p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.info-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.2);
}

.info-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 8px 0;
    font-size: 15px;
    opacity: 0.95;
}

.auth-container {
    max-width: 320px;
    margin: 40px auto;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-size: 32px;
    color: #4f46e5;
    margin-bottom: 8px;
}

.auth-logo p {
    font-size: 14px;
    color: #666;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: #f0f4ff;
    color: #4f46e5;
    transition: all 0.2s;
}

.auth-tab.active {
    background: #4f46e5;
    color: white;
}

.toggle-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    cursor: pointer;
}

.toggle-switch span {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.switch {
    width: 48px;
    height: 28px;
    background: #d1d5db;
    border-radius: 14px;
    position: relative;
    transition: background 0.3s;
}

.switch.active {
    background: #4f46e5;
}

.switch-handle {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 12px;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.switch.active .switch-handle {
    transform: translateX(20px);
}

.template-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.template-btn {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: white;
    color: #333;
    transition: all 0.2s;
}

.template-btn:hover {
    border-color: #4f46e5;
    background: #f0f4ff;
    color: #4f46e5;
}

.output-box {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    min-height: 120px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 20px;
    padding: 24px;
    max-width: 320px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
}

.modal h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.modal-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.modal-buttons .btn {
    flex: 1;
}

@media (max-width: 768px) {
    .preview-container {
        flex-direction: column;
    }
    
    .phone-frame {
        width: 100%;
        max-width: 375px;
    }
    
    .preview-info {
        text-align: center;
    }
}