:root {
    --bg-color: #F5F5F7;
    --card-bg: #FFFFFF;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --accent: #007AFF;
    --success: #34C759;
    --danger: #FF3B30;
    --border: #D2D2D7;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, sans-serif; }

body { background-color: var(--bg-color); color: var(--text-primary); }

nav { height: 60px; background: rgba(255,255,255,0.8); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(0,0,0,0.05); display: flex; align-items: center; justify-content: center; position: fixed; width: 100%; top: 0; z-index: 100; }
.brand { font-weight: 600; font-size: 14px; letter-spacing: 1px; }

.view { min-height: 100vh; padding-top: 80px; }
.hidden { display: none !important; }

/* Home */
#home-view { display: flex; align-items: center; justify-content: center; }
.center-stage { text-align: center; width: 100%; max-width: 400px; padding: 20px; }
h1 { font-size: 32px; margin-bottom: 8px; }
.subtitle { color: var(--text-secondary); margin-bottom: 30px; }

.search-container { position: relative; }
#plateInput { width: 100%; padding: 16px; font-size: 18px; border: 1px solid var(--border); border-radius: 99px; outline: none; text-transform: uppercase; text-align: center; }
.primary-btn-circle { position: absolute; right: 7px; top: 7px; width: 42px; height: 42px; border-radius: 50%; background: var(--text-primary); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; }

/* Profile */
.container { max-width: 900px; margin: 0 auto; padding: 20px; }
.profile-header { margin-bottom: 30px; }
.text-btn { background: none; border: none; color: var(--accent); font-size: 17px; cursor: pointer; display: flex; align-items: center; gap: 5px; }
#dispPlate { font-size: 40px; text-transform: uppercase; }
.editable-name { font-size: 20px; color: var(--text-secondary); border: none; background: transparent; outline: none; width: 100%; }

.grid-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.card { background: var(--card-bg); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

.badge { padding: 4px 12px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge.active { background: rgba(52, 199, 89, 0.15); color: var(--success); }
.badge.inactive { background: rgba(142, 142, 147, 0.15); color: var(--text-secondary); }

.info-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #F2F2F7; }
.label { color: var(--text-secondary); }
.value { font-weight: 500; }

.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.action-btn { background: #F5F5F7; border: none; border-radius: 12px; padding: 15px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.icon-box { font-size: 24px; }
.icon-box.blue { color: var(--accent); }

/* Table */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--text-secondary); padding: 12px; border-bottom: 1px solid var(--border); }
td { padding: 16px 12px; border-bottom: 1px solid #F2F2F7; }
.text-right { text-align: right; }

/* Modals */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(5px); z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal-content { background: white; width: 90%; max-width: 450px; border-radius: 18px; padding: 24px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 5px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px; outline: none; font-size: 16px; }
.total-row { display: flex; justify-content: space-between; font-weight: 700; margin: 20px 0; }

.primary-btn { background: var(--accent); color: white; border: none; padding: 14px; border-radius: 12px; width: 100%; font-weight: 600; cursor: pointer; }
.secondary-btn { background: white; border: 1px solid var(--border); padding: 10px; border-radius: 10px; width: 100%; cursor: pointer; }
.destructive-btn { background: #FFEBEB; color: var(--danger); border: 1px solid var(--danger); padding: 14px; border-radius: 12px; font-weight: 600; cursor: pointer; }
.full-width { width: 100%; }
.helper-text { color: var(--success); font-weight: 600; margin-top: 5px; }