/* ========================================
   GoldTrade Mobile App - iPhone 17 Pro Max Frame
   投资性黄金交易协同系统 - 移动端原型样式
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #C9A962;
    --primary-dark: #B08D3C;
    --primary-light: #E5D4A1;
    --secondary-color: #1A1A2E;
    --accent-color: #16213E;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F3F4F6;
    --bg-tertiary: #E5E7EB;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* iPhone 17 Pro Max Frame */
.iphone-frame {
    width: 430px;
    height: 932px;
    background: #1a1a1a;
    border-radius: 60px;
    padding: 12px;
    box-shadow: 
        0 0 0 3px #2a2a2a,
        0 0 0 6px #1a1a1a,
        0 25px 50px rgba(0,0,0,0.5),
        inset 0 0 5px rgba(255,255,255,0.1);
    position: relative;
}

.iphone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 126px;
    height: 37px;
    background: #1a1a1a;
    border-radius: 0 0 24px 24px;
    z-index: 100;
}

/* Dynamic Island */
.dynamic-island {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 126px;
    height: 37px;
    background: #000;
    border-radius: 24px;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
}

.dynamic-island::before {
    content: '';
    position: absolute;
    right: 36px;
    width: 12px;
    height: 12px;
    background: #1a3a5c;
    border-radius: 50%;
}

/* Screen Container */
.screen {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    border-radius: 48px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Status Bar */
.status-bar {
    height: 54px;
    padding: 14px 28px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: transparent;
    position: relative;
    z-index: 10;
}

.status-bar-left {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-bar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-bar-right i {
    font-size: 16px;
    color: var(--text-primary);
}

.battery {
    width: 27px;
    height: 13px;
    border: 1.5px solid var(--text-primary);
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 2px;
}

.battery::after {
    content: '';
    position: absolute;
    right: -4px;
    width: 2px;
    height: 6px;
    background: var(--text-primary);
    border-radius: 0 2px 2px 0;
}

.battery-level {
    width: 80%;
    height: 100%;
    background: var(--success-color);
    border-radius: 2px;
}

/* App Header */
.app-header {
    padding: 0 20px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding-top: 10px;
}

.app-header.transparent {
    background: transparent;
    color: var(--text-primary);
}

.header-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.header-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

/* Navigation Header */
.nav-header {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.nav-header .back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-color);
    font-size: 17px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-header .title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-header .action-btn {
    color: var(--primary-color);
    font-size: 17px;
    background: none;
    border: none;
    cursor: pointer;
}

/* Content Area */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 100px;
    background: var(--bg-secondary);
}

.content::-webkit-scrollbar {
    display: none;
}

/* Cards */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--primary-color);
}

.card-action {
    font-size: 14px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

/* Gold Price Card */
.gold-price-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.gold-price-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.gold-price-label {
    font-size: 14px;
    opacity: 0.9;
}

.gold-price-value {
    font-size: 36px;
    font-weight: 700;
    margin-top: 4px;
}

.gold-price-unit {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
}

.gold-price-change {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 14px;
}

.gold-price-change.up {
    color: #4ade80;
}

.gold-price-change.down {
    color: #f87171;
}

.gold-price-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.gold-price-item {
    text-align: center;
}

.gold-price-item-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.gold-price-item-value {
    font-size: 16px;
    font-weight: 600;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.quick-action-item:active {
    transform: scale(0.95);
    background: var(--bg-secondary);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.quick-action-icon.gold { background: linear-gradient(135deg, #C9A962, #B08D3C); }
.quick-action-icon.blue { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.quick-action-icon.green { background: linear-gradient(135deg, #10B981, #059669); }
.quick-action-icon.orange { background: linear-gradient(135deg, #F59E0B, #D97706); }
.quick-action-icon.purple { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.quick-action-icon.pink { background: linear-gradient(135deg, #EC4899, #DB2777); }
.quick-action-icon.cyan { background: linear-gradient(135deg, #06B6D4, #0891B2); }
.quick-action-icon.red { background: linear-gradient(135deg, #EF4444, #DC2626); }

.quick-action-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

/* Task List */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.task-item:active {
    background: var(--bg-secondary);
}

.task-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.task-desc {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-badge {
    background: var(--danger-color);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.task-arrow {
    color: var(--text-light);
    font-size: 14px;
}

/* List Items */
.list-group {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

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

.list-item:active {
    background: var(--bg-secondary);
}

.list-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
}

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

.list-item-title {
    font-size: 16px;
    color: var(--text-primary);
}

.list-item-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.list-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
}

.list-item-value {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-primary);
    resize: none;
}

.form-select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-primary);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

.btn-block {
    width: 100%;
}

.btn-sm {
    height: 36px;
    padding: 0 16px;
    font-size: 14px;
}

.btn-lg {
    height: 56px;
    font-size: 18px;
}

/* Status Tags */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.tag-success {
    background: #D1FAE5;
    color: #065F46;
}

.tag-warning {
    background: #FEF3C7;
    color: #92400E;
}

.tag-danger {
    background: #FEE2E2;
    color: #991B1B;
}

.tag-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.tag-default {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* Bottom Tab Bar */
.tab-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 83px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 8px;
    padding-bottom: 34px;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
}

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

.tab-item i {
    font-size: 24px;
}

.tab-item span {
    font-size: 10px;
}

.tab-item .badge {
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Order Card */
.order-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.order-no {
    font-size: 14px;
    color: var(--text-secondary);
}

.order-status {
    font-size: 14px;
    font-weight: 500;
}

.order-body {
    margin-bottom: 12px;
}

.order-product {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.order-product-img {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #C9A962, #B08D3C);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.order-product-info {
    flex: 1;
}

.order-product-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.order-product-spec {
    font-size: 13px;
    color: var(--text-secondary);
}

.order-product-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-top: 4px;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 6px;
}

.order-info-label {
    color: var(--text-secondary);
}

.order-info-value {
    color: var(--text-primary);
}

.order-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state-icon {
    font-size: 64px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Avatar */
.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 32px;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 0 16px;
    height: 44px;
    margin-bottom: 16px;
}

.search-bar i {
    color: var(--text-light);
    margin-right: 10px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-light);
}

/* Section Title */
.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title .more {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Login Page */
.login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--secondary-color) 100%);
}

.login-header {
    flex: 0 0 auto;
    padding: 60px 30px 40px;
    text-align: center;
    color: white;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: var(--primary-color);
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.login-form {
    flex: 1;
    background: white;
    border-radius: 30px 30px 0 0;
    padding: 40px 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-input {
    height: 54px;
    border-radius: var(--radius-lg);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.login-options a {
    color: var(--primary-color);
    text-decoration: none;
}

.login-btn {
    height: 54px;
    border-radius: var(--radius-lg);
    font-size: 18px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.text-muted { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.p-16 { padding: 16px; }

/* Page Navigation */
.page-nav {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-nav a {
    padding: 8px 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s;
}

.page-nav a:hover {
    background: var(--primary-color);
    color: white;
}

.page-nav a.active {
    background: var(--primary-color);
    color: white;
}
