:root {
    --primary: #007AFF; /* iOS Blue */
    --bg: #F2F2F7;
    --card: #FFFFFF;
    --text: #000000;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* Tabs */
.tabs {
    display: flex;
    background: #fff;
    padding: 10px;
    position: sticky;
    top: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 10;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: #8E8E93;
    border-bottom: 3px solid transparent;
    cursor: pointer;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

/* Forms */
.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

h2 {
    margin-top: 0;
    font-size: 22px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    margin-bottom: -10px;
}

input, select, textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px; /* Prevents zoom on iPhone */
    background: #fff;
    appearance: none; /* Removes default iOS styling */
}

textarea {
    resize: none;
}

.action-btn {
    background-color: var(--primary);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
    cursor: pointer;
}

.action-btn:active {
    opacity: 0.8;
}

/* Overlay & Big Font */
#success-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.success-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 85%;
}

#big-po-number {
    font-size: 32px; /* Very large */
    font-weight: 900;
    color: #333;
    margin: 20px 0;
    word-break: break-all;
    border: 2px dashed #333;
    padding: 10px;
}

.close-btn {
    background: #333;
    color: white;
    padding: 10px 30px;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* Loader */
#loading {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
}
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px; height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }