/* ============================================
   PJA SOCIETY APP - DESIGN SYSTEM
   Version: 1.0
   Date: June 2026
   ============================================ */

@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

:root {
    /* ============================================
       COLOR PALETTE
       ============================================ */
    
    /* Primary Colors */
    --primary: #1E40AF;
    --primary-light: #3B82F6;
    --primary-dark: #1E3A8A;
    --primary-50: #EFF6FF;
    --primary-100: #DBEAFE;
    --primary-200: #BFDBFE;
    
    /* Secondary Colors */
    --secondary: #059669;
    --secondary-light: #10B981;
    --secondary-dark: #047857;
    
    /* Accent Colors */
    --accent: #F59E0B;
    --accent-light: #FCD34D;
    --accent-dark: #D97706;
    
    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --black: #000000;
    
    /* Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    
    /* ============================================
       TYPOGRAPHY
       ============================================ */
    
    /* Font Family */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Font Sizes */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */
    
    /* Font Weights */
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;
    
    /* ============================================
       SPACING
       ============================================ */
    
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    
    /* ============================================
       BORDER RADIUS
       ============================================ */
    
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.5rem;   /* 24px */
    --radius-full: 9999px;
    
    /* ============================================
       SHADOWS
       ============================================ */
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* ============================================
       TRANSITIONS
       ============================================ */
    
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* ============================================
       Z-INDEX
       ============================================ */
    
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
    
    /* ============================================
       iOS STATUS BAR
       ============================================ */
    
    --status-bar-height: 44px;
    --safe-area-top: 44px;
    --safe-area-bottom: 34px;
    --nav-bar-height: 44px;
    --tab-bar-height: 83px;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

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

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--gray-900);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   iOS DEVICE FRAME
   ============================================ */

.ios-device {
    width: 375px;
    height: 812px;
    background: var(--white);
    border-radius: 44px;
    box-shadow: var(--shadow-xl), 0 0 0 12px var(--gray-800);
    overflow: hidden;
    position: relative;
    margin: 40px auto;
}

.ios-status-bar {
    height: var(--status-bar-height);
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-6);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
}

.ios-status-bar .time {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--gray-900);
}

.ios-status-bar .icons {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.ios-status-bar .icons span {
    font-size: var(--text-xs);
    color: var(--gray-900);
}

/* ============================================
   NAVIGATION BAR
   ============================================ */

.nav-bar {
    height: var(--nav-bar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-4);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.nav-bar .back-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-bar .title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--gray-900);
}

.nav-bar .action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
}

/* ============================================
   TAB BAR
   ============================================ */

.tab-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--tab-bar-height);
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: var(--space-2);
    padding-bottom: var(--safe-area-bottom);
}

.tab-bar .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2);
    background: none;
    border: none;
    cursor: pointer;
    min-width: 60px;
}

.tab-bar .tab-item .icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
}

.tab-bar .tab-item .label {
    font-size: var(--text-xs);
    color: var(--gray-500);
}

.tab-bar .tab-item.active .icon {
    color: var(--primary);
}

.tab-bar .tab-item.active .label {
    color: var(--primary);
    font-weight: var(--weight-medium);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-50);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: var(--radius-full);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    box-shadow: var(--shadow-md);
}

.card-flat {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    border: 1px solid var(--gray-200);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.input-label {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--gray-700);
}

.input-field {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--white);
    transition: border-color var(--transition-fast);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.input-field::placeholder {
    color: var(--gray-400);
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-full);
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary);
}

.badge-success {
    background: #D1FAE5;
    color: var(--secondary-dark);
}

.badge-warning {
    background: #FEF3C7;
    color: var(--accent-dark);
}

.badge-danger {
    background: #FEE2E2;
    color: var(--error);
}

/* ============================================
   AVATAR
   ============================================ */

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--weight-semibold);
    color: var(--primary);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: var(--text-sm);
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: var(--text-xl);
}

/* ============================================
   LIST ITEMS
   ============================================ */

.list-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item .icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
}

.list-item .content {
    flex: 1;
}

.list-item .title {
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--gray-900);
}

.list-item .subtitle {
    font-size: var(--text-sm);
    color: var(--gray-500);
}

.list-item .arrow {
    color: var(--gray-400);
}

/* ============================================
   UTILITIES
   ============================================ */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.p-4 { padding: var(--space-4); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.text-center { text-align: center; }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.font-medium { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.text-gray { color: var(--gray-500); }
.w-full { width: 100%; }
