* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-500: #6b7280;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    padding-bottom: 80px;
}

.container { max-width: 480px; margin: 0 auto; padding: 16px; }
.auth-container { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; text-align: center; }
.auth-logo { font-size: 64px; margin-bottom: 16px; }

h1 { font-size: 20px; font-weight: 600; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.subtitle { color: var(--gray-500); font-size: 14px; }
.label { font-size: 12px; color: var(--gray-500); }
.value { font-size: 18px; font-weight: 600; }
.value-success { font-size: 20px; font-weight: 700; color: var(--success); }
.big-icon { font-size: 48px; margin-bottom: 8px; }
.big-time { font-size: 36px; font-weight: 700; }
.big-money { font-size: 32px; font-weight: 700; margin: 12px 0; }
.text-center { text-align: center; }
.text-danger { color: var(--danger); }

/* Header */
.header {
    background: white;
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.icon-btn {
    font-size: 24px;
    text-decoration: none;
    color: var(--gray-900);
    padding: 4px 8px;
}

/* Card */
.card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card-title {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.status-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.info-row { display: flex; align-items: center; gap: 12px; }
.info-icon { font-size: 32px; }

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* Button */
.btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: white;
    margin-bottom: 12px;
    transition: all 0.2s;
}
.btn-primary { background: var(--primary); }
.btn-success { background: var(--success); }
.btn-danger { background: var(--danger); }
.btn-large { padding: 24px; }
.btn-large .btn-icon { font-size: 32px; margin-bottom: 8px; }
.btn-small { padding: 8px; font-size: 14px; width: auto; display: inline-block; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Form */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Info Box */
.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.info-box.success { background: #d1fae5; border-color: #a7f3d0; }
.info-box.error { background: #fee2e2; border-color: #fecaca; }

/* Alert */
.alert { padding: 12px; border-radius: 8px; margin-bottom: 16px; text-align: left; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Empty State */
.empty-state { text-align: center; padding: 20px; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }

/* Photo Grid */
.photo-section { margin-bottom: 16px; }
.photo-section label { display: block; margin-bottom: 8px; font-weight: 600; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-add {
    aspect-ratio: 1;
    background: var(--gray-100);
    border: 2px dashed var(--gray-500);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--gray-500);
    cursor: pointer;
}

/* Signature */
.signature-pad {
    width: 100%;
    height: 150px;
    border: 2px solid var(--gray-100);
    border-radius: 8px;
    background: white;
    margin-bottom: 8px;
    touch-action: none;
}

/* Salary Row */
.salary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
}
.salary-row.total {
    border-top: 2px solid var(--gray-900);
    border-bottom: none;
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 700;
    font-size: 16px;
}

/* Menu Item */
.menu-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
}
.menu-item:last-child { border-bottom: none; }

/* Avatar */
.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 12px;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 1000;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray-500);
    font-size: 11px;
    padding: 4px 12px;
}
.nav-item.active { color: var(--primary); }
.nav-icon { font-size: 24px; margin-bottom: 2px; }

/* Loading */
.loading-inline {
    width: 20px;
    height: 20px;
    border: 3px solid var(--gray-100);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.toast.show { opacity: 1; }