/* --- VARIABLES & RESET --- */
:root {
    --primary: #2596be;
    --danger:#D22B2B;
    --primary-dark: #4338ca;
    --bg-color: #F9FAFB;
    --white: #ffffff;
    --text-dark: #111827;
    --text-light: #6B7280;
    --border-radius: 16px;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #e5e7eb; /* Desktop background */
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* --- MOBILE CONTAINER --- */
.app-container {
    width: 100%;
    max-width: 430px;
    background-color: var(--bg-color);
    min-height: 100vh;
    position: relative;
    padding-bottom: 90px; /* Space for bottom nav */
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow-x: hidden;
}

/* --- HEADERS & HERO --- */
.hero-section {
    background:
        linear-gradient(135deg, #2596be 0%, #1E293B 60%),
        radial-gradient(circle at top right, rgba(255,255,255,0.15), transparent 40%);
    padding: 20px;
    color: #ffffff;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    margin-bottom: 20px;
}

.hero-title { font-size: 19px; font-weight: 700; }
.hero-subtitle { font-size: 14px; opacity: 0.9; margin-top: 5px; }

.page-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* --- BUTTONS --- */
.back-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    margin-right: 15px;
    cursor: pointer;
    color: var(--text-dark);
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.btn-primary { background: var(--primary); color: white; }

/* --- HOME GRID WITH IMAGES --- */
.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 0 20px;
}

.category-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.category-card:active { transform: scale(0.98); }

.card-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    background: #e0e7ff;
}

.card-details {
    padding: 12px;
    text-align: center;
}
.card-details span { font-weight: 600; font-size: 14px; color: var(--text-dark); display: block; }
.card-details small { font-size: 11px; color: var(--text-light); }

/* --- FORMS & INPUTS --- */
.form-section { padding: 20px; }
.form-group { margin-bottom: 15px; }
input, textarea {
    width: 100%; padding: 14px; border: 1px solid #e5e7eb;
    border-radius: 12px; background: var(--white); outline: none;
}
input:focus, textarea:focus { border-color: var(--primary); }

/* --- DETAILS PAGE UI --- */
.option-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}
.radio-group { display: flex; gap: 10px; margin-top: 10px; }
.radio-label {
    flex: 1; padding: 10px; text-align: center; border: 1px solid #e5e7eb;
    border-radius: 8px; font-size: 13px; cursor: pointer;
}
input[type="radio"]:checked + .radio-label {
    background: #EEF2FF; border-color: var(--primary); color: var(--primary); font-weight: bold;
}

/* --- BOTTOM NAVIGATION BAR --- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 430px;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-top: 1px solid #f3f4f6;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.03);
    z-index: 100;
}
.nav-item {
    text-align: center; color: #9CA3AF; text-decoration: none; font-size: 10px;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.nav-item i { font-size: 20px; margin-bottom: 2px; }
.nav-item.active { color: var(--primary); }

/* --- CONFIRMATION PAGE --- */
.success-container {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 80vh; text-align: center; padding: 20px;
}
.success-icon {
    width: 80px; height: 80px; background: #D1FAE5; color: #10B981;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 40px; margin-bottom: 20px;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
@keyframes popIn { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.order-id-box {
    background: #F3F4F6; padding: 10px 20px; border-radius: 8px;
    margin: 20px 0; font-family: monospace; letter-spacing: 2px; font-weight: 700;
}

/**/

.form-select {
    width: 100%;
    padding: 14px 42px 14px 14px; /* space for arrow */
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    background-color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Focus state */
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 150, 190, 0.15);
}

/* Disabled */
.form-select:disabled {
    background-color: #F3F4F6;
    color: #9CA3AF;
    cursor: not-allowed;
}

/* Custom dropdown arrow */
.form-select {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%239CA3AF' viewBox='0 0 20 20'%3E%3Cpath d='M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.25a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
}

/**/
/* --- CUSTOM RADIO CARD UX --- */
.radio-container {
    display: flex;
    gap: 15px;
}
.radio-card {
    flex: 1;
    position: relative;
}
/* Hide the actual ugly radio circle */
.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
/* The visual box */
.card-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 2px solid #E5E7EB; /* Grey border */
    border-radius: 12px;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
}
.card-visual i {
    font-size: 24px;
    color: #9CA3AF;
    margin-bottom: 8px;
}
.card-visual span {
    font-weight: 600;
    font-size: 14px;
    color: #4B5563;
}
.card-visual small {
    font-size: 11px;
    color: #9CA3AF;
}

/* CHECKED STATE */
.radio-card input[type="radio"]:checked + .card-visual {
    border-color: var(--primary);
    background-color: #EEF2FF; /* Light Indigo */
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.1);
}
.radio-card input[type="radio"]:checked + .card-visual i,
.radio-card input[type="radio"]:checked + .card-visual span {
    color: var(--primary);
}


/*confirmation*/

.success-container {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding-top: 40px; text-align: center;
}
.success-icon {

    width: 80px;
    height: 80px;
    min-width: 80px; 
    min-height: 80px;


    background: #D1FAE5;
    color: #10B981;
    border-radius: 50%;
    

    display: flex;
    align-items: center;
    justify-content: center;
    

    font-size: 40px;
    margin-bottom: 20px;
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes popIn { 0% { transform: scale(0); } 80% { transform: scale(1.1); } 100% { transform: scale(1); } }

.order-id-box {
    background: #F3F4F6; padding: 15px 30px; border-radius: 12px;
    margin: 20px 0; font-family: monospace; font-size: 24px; 
    letter-spacing: 2px; font-weight: 700; color: var(--text-dark);
    border: 2px dashed #D1D5DB;
}

.details-box {
    width: 100%; background: white; border-radius: 16px; padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: left;
    margin-bottom: 30px;
}
.detail-row {
    display: flex; justify-content: space-between; margin-bottom: 12px;
    font-size: 14px;
}
.detail-row:last-child { margin-bottom: 0; padding-top: 10px; border-top: 1px solid #f3f4f6; }
.label { color: var(--text-grey); }
.value { font-weight: 600; color: var(--text-dark); }
.status-badge {
    background: #FEF3C7; color: #D97706; padding: 4px 8px; 
    border-radius: 6px; font-size: 12px; font-weight: 700;
}
 .status-badges {
   background:#DCFCE7; color:#166534;padding: 4px 8px; 
    border-radius: 6px; font-size: 12px; font-weight: 700;
}


/*order box*/

.order-card {
    background: white;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: 1px solid #F3F4F6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.order-card:active {
    transform: scale(0.98);
    background: #F9FAFB;
}

/* Icon Box */
.order-icon-box {
    width: 50px; height: 50px;
    background: #EEF2FF;
    color: var(--primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    margin-right: 15px;
}

/* Text Layout */
.order-info { flex: 1; }
.order-title { font-weight: 700; font-size: 15px; color: var(--text-dark); display: block;}
.order-id { font-size: 12px; color: var(--text-grey); font-family: monospace; letter-spacing: 0.5px; }
.order-date { font-size: 11px; color: #9CA3AF; display: block; margin-top: 4px; }

/* Status Badges */
.status-badge {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    margin-bottom: 5px;
    display: inline-block;
}

/* Processing */
.status-processing {
    background: #DBEAFE;
    color: #1D4ED8;
}

/* Ready */
.status-ready {
    background: #FEF3C7;
    color: #D97706;
}

/* Delivered */
.status-delivered {
    background: #DCFCE7;
    color: #166534;
}


.order-price { font-weight: 700; color: var(--text-dark); font-size: 15px; text-align: right; }

/*profile*/

.profile-header {
    text-align: center;
    padding: 30px 20px;
    background: var(--white);
    margin-bottom: 20px;
}
.avatar-large {
    width: 80px; height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid #EEF2FF;
}
.logout-btn {
    color: #EF4444; /* Red color */
    background: #FEF2F2;
    margin-top: 20px;
}

.settings-footer.premium {
    margin-top: 30px;
    padding-top: 18px;
    font-size: 12px;
    text-align: center;
    color: var(--text-light);
    border-top: 1px solid #E5E7EB;
}

.settings-footer.premium strong {
    color: var(--primary);
}

.settings-footer a {
    text-decoration:none;
    color: var(--primary);
}
