/* ═══════════════════════════════════════════════════════════════════════════
   KURYEM iOS PWA - CSS Styles
   Android uygulamasinin birebir klonu
   ═══════════════════════════════════════════════════════════════════════════ */

/* Variables */
:root {
    --courier-pink: #FF1D63;
    --courier-blue: #0B7FE6;
    --courier-green: #18B45C;
    --courier-cream: #FBF6EE;
    --text-primary: #111111;
    --text-secondary: #8A8A8A;
    --background-light: #F9FAFB;
    --background-white: #FFFFFF;
    --border-light: #EEEEEE;
    --divider-color: #EEEEEE;
    --status-online: #18B45C;
    --status-offline: #9E9E9E;
    --status-error: #E53935;

    /* Safe areas for iOS */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    height: 100%;
    height: -webkit-fill-available;
}

body {
    height: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow: hidden;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background-light);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    height: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    position: relative;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */

.loading-screen {
    position: fixed;
    inset: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.logo-box {
    width: 80px;
    height: 80px;
    background: var(--courier-pink);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transform: rotate(-10deg);
}

.logo-box span {
    color: white;
    font-size: 40px;
    font-weight: 700;
    font-style: italic;
}

.logo-text {
    color: var(--courier-pink);
    font-size: 40px;
    font-weight: 700;
    font-style: italic;
    margin-bottom: 8px;
}

.logo-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-light);
    border-top-color: var(--courier-pink);
    border-radius: 50%;
    margin: 24px auto 0;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */

.screen {
    position: absolute;
    inset: 0;
    background: var(--background-light);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    min-height: 100%;
    min-height: -webkit-fill-available;
}

#main-screen {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

#main-screen .header {
    flex-shrink: 0;
}

#main-screen .tabs-container {
    flex-shrink: 0;
}

#main-screen .tab-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

#login-screen {
    background: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}

.login-bg-circle {
    position: fixed;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.1;
    pointer-events: none;
}

.login-bg-circle.top {
    top: -100px;
    right: -50px;
    background: var(--courier-pink);
}

.login-bg-circle.bottom {
    bottom: -100px;
    left: -50px;
    background: #E3F2FD;
    opacity: 0.5;
}

.login-container {
    width: 100%;
    max-width: 360px;
    padding: 32px;
    text-align: center;
    position: relative;
    z-index: 1;
    margin: auto;
}

.login-form {
    margin-top: 40px;
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 20px;
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: #FAFAFA;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--courier-pink);
}

.version-text {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 24px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: var(--courier-pink);
    color: white;
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-success {
    background: var(--courier-green);
    color: white;
}

.btn-danger {
    background: var(--status-error);
    color: white;
}

.btn-outline {
    background: white;
    color: var(--courier-pink);
    border: 1px solid rgba(255, 29, 99, 0.2);
}

.btn-share {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 100%;
}

.btn-large {
    flex: 1.5;
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════ */

.header {
    background: var(--courier-pink);
    padding: calc(var(--safe-top) + 16px) 16px 24px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 100;
}

.header-logo {
    color: white;
    font-size: 32px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
}

.header-actions .material-icons-round {
    font-size: 28px;
}

.menu-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
}

.header-back {
    justify-content: center;
    position: relative;
    border-radius: 0 0 24px 24px;
}

/* Header + Tabs kombinasyonu olan ekranlar */
#history-screen {
    display: flex;
    flex-direction: column;
}

#history-screen .header-back {
    border-radius: 0;
    flex-shrink: 0;
}

#history-screen .tabs-container {
    margin-top: 0;
    flex-shrink: 0;
}

#history-screen .screen-content {
    flex: 1;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

/* Other screens with scroll */
#profile-screen,
#earnings-screen,
#notifications-screen,
#help-screen {
    display: flex;
    flex-direction: column;
}

#profile-screen .header,
#earnings-screen .header,
#notifications-screen .header,
#help-screen .header {
    flex-shrink: 0;
}

.back-btn {
    position: absolute;
    left: 8px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
}

.back-btn .material-icons-round {
    font-size: 32px;
}

.header-title {
    color: white;
    font-size: 18px;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════════════════════════════ */

.tabs-container {
    background: var(--courier-pink);
    padding: 16px 16px 20px;
    margin-top: 0;
    border-radius: 0 0 24px 24px;
    position: relative;
    z-index: 99;
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 4px;
}

.tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.tab.active {
    background: white;
    color: var(--courier-pink);
    font-weight: 600;
}

.tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TAB CONTENT - BASIT YAPI
   ═══════════════════════════════════════════════════════════════════════════ */

.tab-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: var(--background-light);
    height: 100%;
}

.tab-panel {
    display: none;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-panel.active {
    display: block;
}

#pool-orders,
#my-orders {
    background: white;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(env(safe-area-inset-bottom, 20px) + 200px); /* Extra space for last item */
}

#pool-empty,
#pool-locked,
#my-orders-empty {
    background: var(--background-light);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ORDERS LIST
   ═══════════════════════════════════════════════════════════════════════════ */

.orders-list {
    background: white;
}

.order-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: white;
    border-bottom: 1px solid var(--divider-color);
    cursor: pointer;
    transition: background 0.2s;
}

.order-card:active {
    background: #F5F5F5;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.brand-logo.getir { background: #5D3EB2; }
.brand-logo.trendyol { background: #F27A1A; }
.brand-logo.yemeksepeti { background: #FF1D63; }
.brand-logo.default { background: #FF1D63; }

.order-info {
    flex: 1;
    margin-left: 16px;
    min-width: 0;
}

.restaurant-name {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-name {
    font-weight: 600;
    font-size: 14px;
    color: rgba(17, 17, 17, 0.85);
    margin-bottom: 4px;
}

.order-detail-row {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

.order-detail-row .material-icons-round {
    font-size: 12px;
    color: #D3D3D3;
}

.order-commission {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--courier-green);
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
}

.order-commission .material-icons-round {
    font-size: 14px;
}

.order-time {
    background: var(--background-light);
    padding: 4px 8px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.order-time .material-icons-round {
    font-size: 12px;
}

/* My Order Card */
.my-order-card {
    padding: 16px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    margin: 8px 16px;
    cursor: pointer;
}

.my-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.my-order-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.my-order-info .brand-logo {
    width: 40px;
    height: 40px;
}

.my-order-info h4 {
    font-weight: 700;
    font-size: 16px;
}

.my-order-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.delivering {
    background: rgba(11, 127, 230, 0.1);
    color: var(--courier-blue);
}

.status-badge .material-icons-round {
    font-size: 14px;
}

.my-order-details {
    margin-bottom: 12px;
}

.my-order-details .order-detail-row {
    margin-bottom: 4px;
}

.my-order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.my-order-footer span {
    font-size: 14px;
    color: var(--text-secondary);
}

.my-order-footer .price {
    font-size: 18px;
    font-weight: 700;
    color: var(--courier-green);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    text-align: center;
    min-height: 300px;
}

.empty-icon {
    font-size: 80px;
    color: #E0E0E0;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Pool loading state */
#pool-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--courier-pink);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ORDER DETAIL SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */

#order-detail-screen {
    background: var(--courier-cream);
}

.order-detail-header {
    position: relative;
    height: 100px;
}

.order-detail-bg {
    position: absolute;
    inset: 0;
    background: var(--courier-pink);
}

.close-btn {
    position: absolute;
    top: calc(var(--safe-top) + 16px);
    right: 16px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 10;
}

.close-btn .material-icons-round {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.7);
}

.order-detail-card {
    background: white;
    margin: -50px 0 0;
    padding: 20px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 5;
}

.order-detail-info {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.order-detail-info .brand-logo {
    width: 56px;
    height: 56px;
}

.customer-info h2 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 2px;
}

.customer-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 2px;
}

.info-row .material-icons-round {
    font-size: 14px;
}

/* Adres kopyalanabilir olsun */
#detail-address {
    cursor: pointer;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 6px;
    transition: background-color 0.2s;
    user-select: text;
    -webkit-user-select: text;
}

#detail-address:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

#detail-address:active {
    background-color: rgba(0, 0, 0, 0.1);
}

.order-detail-actions {
    display: flex;
    gap: 8px;
}

.order-detail-actions .btn {
    flex: 1;
    height: 46px;
    padding: 0 8px;
    font-size: 13px;
}

.order-detail-actions .btn .material-icons-round {
    font-size: 18px;
}

.order-items-list {
    flex: 1;
    padding: 16px 24px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-light);
}

.order-item:last-child {
    border-bottom: none;
}

.item-qty {
    width: 32px;
    height: 32px;
    background: var(--background-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--courier-pink);
    margin-right: 12px;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    font-size: 14px;
}

.item-note {
    font-size: 12px;
    color: var(--text-secondary);
}

.item-price {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.order-detail-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 16px calc(var(--safe-bottom) + 12px);
    display: flex;
    gap: 10px;
}

.order-detail-footer .btn {
    height: 50px;
    font-size: 14px;
}

.order-detail-footer .btn-danger {
    flex: 1;
}

.order-detail-footer .btn-success {
    flex: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCREEN CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */

.screen-content {
    padding: 16px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 80px);
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    flex: 1;
}

.screen-content.no-padding {
    padding: 0;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
}

.screen-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 16px;
    padding-bottom: calc(var(--safe-bottom) + 16px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROFILE SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */

.status-card {
    background: white;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--status-offline);
}

.status-dot.online {
    background: var(--status-online);
}

.status-info h4 {
    font-size: 14px;
    font-weight: 700;
}

.status-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Switch */
.switch {
    position: relative;
    width: 51px;
    height: 31px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #E0E0E0;
    border-radius: 31px;
    transition: 0.3s;
}

.slider::before {
    position: absolute;
    content: "";
    width: 27px;
    height: 27px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .slider {
    background: var(--status-online);
}

input:checked + .slider::before {
    transform: translateX(20px);
}

/* Sections */
.section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.info-field {
    background: white;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.info-field:first-of-type {
    border-radius: 12px 12px 0 0;
}

.info-field:last-of-type {
    border-radius: 0 0 12px 12px;
    border-bottom: none;
}

.info-field label {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

.info-field span {
    font-size: 16px;
    font-weight: 500;
}

.menu-item {
    width: 100%;
    background: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.menu-item h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.menu-item p {
    font-size: 12px;
    color: var(--text-secondary);
}

.menu-item .material-icons-round {
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EARNINGS SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */

.earning-cards {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.earning-card {
    flex: 1;
    background: white;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.earning-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.earning-icon.green {
    background: #E8F5E9;
    color: #2E7D32;
}

.earning-icon.blue {
    background: #E3F2FD;
    color: #1565C0;
}

.earning-icon .material-icons-round {
    font-size: 20px;
}

.earning-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

.earning-value {
    font-size: 20px;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.earning-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

.earning-sub.green {
    color: #2E7D32;
}

.date-picker-btn {
    width: 100%;
    background: var(--courier-pink);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 16px;
}

.date-label {
    font-size: 12px;
    opacity: 0.9;
    display: block;
    text-align: left;
    margin-bottom: 4px;
}

.date-value {
    font-size: 16px;
    font-weight: 700;
    display: block;
    text-align: left;
}

/* Report Card */
.report-card {
    background: var(--text-primary);
    padding: 20px;
    border-radius: 16px;
    color: white;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.report-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.report-date {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
}

.report-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.report-row span:first-child {
    opacity: 0.7;
}

.report-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 16px 0;
}

.report-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.report-total span:first-child {
    font-size: 18px;
    font-weight: 700;
}

.total-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--courier-pink);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ORDER HISTORY
   ═══════════════════════════════════════════════════════════════════════════ */

.history-card {
    background: white;
    padding: 16px;
    border-radius: 16px;
    margin: 8px 16px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.history-header h4 {
    font-weight: 700;
    font-size: 16px;
}

.history-header span {
    font-size: 12px;
    color: var(--text-secondary);
}

.status-badge.delivered {
    background: rgba(24, 180, 92, 0.1);
    color: var(--courier-green);
}

.status-badge.cancelled {
    background: rgba(229, 57, 53, 0.1);
    color: var(--status-error);
}

.history-address {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.history-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-footer .time {
    font-size: 12px;
    color: var(--text-secondary);
}

.history-footer .price {
    font-size: 16px;
    font-weight: 700;
}

.history-footer .price.delivered {
    color: var(--courier-green);
}

.history-footer .price.cancelled {
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.notifications-list {
    padding: 16px;
}

.notification-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    border-left: 4px solid var(--courier-pink);
}

.notification-item h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.notification-item p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.notification-item .time {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HELP SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */

.help-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 16px;
}

.help-icon {
    font-size: 48px;
    color: var(--courier-pink);
    margin-bottom: 12px;
}

.help-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.help-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.help-card .btn {
    width: 100%;
}

.faq-section {
    margin-top: 24px;
}

.faq-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.faq-item h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.faq-item p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
    z-index: 200;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    background: white;
    transform: translateX(100%);
    transition: transform 0.25s ease-out;
    z-index: 201;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    background: var(--courier-pink);
    padding: calc(var(--safe-top) + 32px) 32px 32px;
    border-radius: 0 0 0 40px;
}

.user-avatar {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.user-status {
    margin-bottom: 8px;
}

.user-status .status-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.user-status .status-dot {
    width: 8px;
    height: 8px;
    background: var(--status-offline);
}

.user-status .status-dot.online {
    background: #4CAF50;
}

.user-name {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.user-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.sidebar-menu {
    flex: 1;
    padding: 24px;
}

.sidebar-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: none;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.sidebar-item.active {
    background: #FFF0F5;
    color: var(--courier-pink);
    font-weight: 700;
}

.sidebar-item .material-icons-round {
    font-size: 24px;
}

.sidebar-footer {
    padding: 24px;
    padding-bottom: calc(var(--safe-bottom) + 24px);
    border-top: 1px solid var(--border-light);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: none;
    border: none;
    color: var(--status-error);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
}

.logout-btn .material-icons-round {
    font-size: 24px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DIALOGS
   ═══════════════════════════════════════════════════════════════════════════ */

.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 300;
}

.dialog-overlay.active {
    opacity: 1;
    visibility: visible;
}

.dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 16px;
    width: calc(100% - 48px);
    max-width: 340px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 301;
}

.dialog.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.dialog-content {
    padding: 24px;
    text-align: center;
}

.dialog-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.dialog-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.dialog-customer {
    font-weight: 600;
    color: var(--text-primary) !important;
}

.dialog-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.dialog-actions .btn {
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════════════════ */

.toast {
    position: fixed;
    bottom: calc(var(--safe-bottom) + 80px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 400;
    max-width: calc(100% - 48px);
    text-align: center;
}

.toast.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: var(--courier-green);
}

.toast.error {
    background: var(--status-error);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 360px) {
    .header-logo {
        font-size: 28px;
    }

    .tab {
        font-size: 13px;
        padding: 10px 12px;
    }

    .earning-value {
        font-size: 18px;
    }
}

/* Prevent pull to refresh */
body {
    overscroll-behavior-y: contain;
}

/* Hide scrollbar but keep functionality */
.screen::-webkit-scrollbar,
.tab-panel::-webkit-scrollbar,
.screen-content::-webkit-scrollbar {
    display: none;
}

.screen,
.tab-panel,
.screen-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MULTI-SELECT MODE
   ═══════════════════════════════════════════════════════════════════════════ */

.multiselect-bar {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, rgba(255, 29, 99, 0.15) 0%, rgba(255, 29, 99, 0.08) 100%);
    padding: 16px;
    margin: 8px 16px 12px;
    border-radius: 16px;
    z-index: 100;
    border: 2px solid var(--courier-pink);
    box-shadow: 0 4px 12px rgba(255, 29, 99, 0.15);
    display: none;
    flex-direction: column;
}

.multiselect-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

#multiselect-count {
    font-weight: 700;
    color: var(--courier-pink);
    font-size: 16px;
}

#multiselect-limit {
    font-size: 12px;
    color: var(--text-secondary);
}

.multiselect-actions {
    display: flex;
    gap: 10px;
}

.multiselect-actions .btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
}

.multiselect-actions .btn-sm {
    padding: 12px 16px;
    font-size: 14px;
}

.multiselect-actions .btn-success {
    background: var(--courier-green);
    box-shadow: 0 2px 8px rgba(24, 180, 92, 0.3);
}

.pool-hint {
    background: #F5F5F5;
    padding: 10px 14px;
    margin: 0 16px 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pool-hint .material-icons-round {
    color: var(--text-secondary);
    font-size: 18px;
    margin-right: 8px;
}

.pool-hint span {
    font-size: 12px;
    color: var(--text-secondary);
}

.pool-hint .hint-slots {
    font-weight: 600;
    color: var(--text-primary);
}

/* Selected order card */
.order-card.selected {
    border: 3px solid var(--courier-green);
    background: rgba(24, 180, 92, 0.08);
    box-shadow: 0 4px 12px rgba(24, 180, 92, 0.2);
    position: relative;
}

.order-card.selected .brand-logo {
    background: var(--courier-green) !important;
    position: relative;
}

.order-card.selected .brand-logo::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: white;
    font-weight: bold;
}

/* Selection checkbox indicator */
.order-card.selected::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--courier-green);
    border-radius: 50%;
    z-index: 10;
}

.order-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 14px;
    color: white;
    font-weight: bold;
    z-index: 11;
}

.selection-indicator {
    display: none;
}

/* Button full width */
.btn-full {
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PASSWORD CHANGE SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */

.password-form-container {
    background: white;
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
    margin-top: 16px;
}

.password-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--courier-pink) 0%, #FF6B9D 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.password-icon .material-icons-round {
    font-size: 40px;
    color: white;
}

.password-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.password-rules {
    font-size: 12px;
    color: var(--courier-pink);
    margin-bottom: 24px;
    line-height: 1.4;
    padding: 8px 12px;
    background: rgba(255, 29, 99, 0.05);
    border-radius: 8px;
}

.password-form {
    text-align: left;
}

.password-form .input-group {
    margin-bottom: 16px;
}

.password-form .input-group input {
    background: var(--background-light);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADDITIONAL STATUS BADGES
   ═══════════════════════════════════════════════════════════════════════════ */

.status-badge.pool {
    background: rgba(158, 158, 158, 0.1);
    color: var(--status-offline);
}

.status-badge.assigned {
    background: rgba(255, 29, 99, 0.1);
    color: var(--courier-pink);
}

.status-badge.picked {
    background: rgba(11, 127, 230, 0.1);
    color: var(--courier-blue);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PICKUP BUTTON STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.btn-pickup {
    background: var(--courier-blue);
    color: white;
}

.btn-pickup:active {
    opacity: 0.9;
    transform: scale(0.98);
}

/* Two button layout in order detail */
.order-detail-footer.two-buttons {
    gap: 10px;
}

.order-detail-footer.two-buttons .btn {
    flex: 1;
}

.order-detail-footer.two-buttons .btn-pickup {
    flex: 1;
}

.order-detail-footer.two-buttons .btn-success {
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROFILE STATISTICS CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.stats-cards {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    flex: 1;
    background: white;
    padding: 16px 12px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.stat-icon.green {
    background: rgba(24, 180, 92, 0.15);
    color: var(--courier-green);
}

.stat-icon.blue {
    background: rgba(11, 127, 230, 0.15);
    color: var(--courier-blue);
}

.stat-icon.red {
    background: rgba(229, 57, 53, 0.15);
    color: var(--status-error);
}

.stat-icon .material-icons-round {
    font-size: 22px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TARGET PROGRESS CARD
   ═══════════════════════════════════════════════════════════════════════════ */

.target-progress-card {
    background: linear-gradient(135deg, var(--courier-pink) 0%, #FF6B9D 100%);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 16px;
    color: white;
}

.target-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.target-label {
    font-size: 14px;
    font-weight: 600;
}

.target-value {
    font-size: 18px;
    font-weight: 700;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 12px;
    opacity: 0.9;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EARNINGS BREAKDOWN LIST
   ═══════════════════════════════════════════════════════════════════════════ */

.earnings-breakdown {
    margin-top: 20px;
}

.breakdown-list {
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-info {
    display: flex;
    flex-direction: column;
}

.breakdown-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.breakdown-count {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.breakdown-amount {
    font-size: 16px;
    font-weight: 700;
    color: var(--courier-green);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EARNINGS SCREEN LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

#earnings-screen {
    display: flex;
    flex-direction: column;
}

#earnings-screen .header-back {
    border-radius: 0;
    flex-shrink: 0;
}

#earnings-screen .tabs-container {
    margin-top: 0;
    flex-shrink: 0;
}

#earnings-screen .screen-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATION TYPES
   ═══════════════════════════════════════════════════════════════════════════ */

.notification-item.info {
    border-left-color: var(--courier-blue);
}

.notification-item.promo {
    border-left-color: var(--courier-green);
}

.notification-item.warning {
    border-left-color: #FFA000;
}

.notification-item.announcement {
    border-left-color: var(--courier-pink);
}

.notification-item.unread {
    background: #FFF8FA;
}

.notification-item .notification-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 4px;
}

.notification-badge.info {
    background: rgba(11, 127, 230, 0.1);
    color: var(--courier-blue);
}

.notification-badge.promo {
    background: rgba(24, 180, 92, 0.1);
    color: var(--courier-green);
}

.notification-badge.warning {
    background: rgba(255, 160, 0, 0.1);
    color: #FFA000;
}

.notification-badge.announcement {
    background: rgba(255, 29, 99, 0.1);
    color: var(--courier-pink);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RECEIPT MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.btn-info {
    background: var(--courier-blue);
    color: white;
}

.btn-info:active {
    background: #0969b8;
}

.receipt-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.receipt-modal.active {
    display: flex;
}

.receipt-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.receipt-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
}

.receipt-close-btn .material-icons-round {
    font-size: 28px;
}

.receipt-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
    touch-action: pinch-zoom;
}

.receipt-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.receipt-hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    padding-bottom: 32px;
}
