/* style.css - Master Cross-Platform Mobile Architecture Core */

/* CORE SYSTEM RESET */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body, html { 
    height: 100%; 
    overflow: hidden; 
    background-color: #050811; 
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
}

/* NATIVE SYSTEM MOBILE CONTAINER BOUNDS */
.iphone-frame { 
    width: 100%; 
    max-width: 430px; 
    height: 100vh; 
    max-height: 100vh; 
    margin: 0 auto; 
    padding: 24px 16px; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    background: radial-gradient(circle at top right, #0d1527 0%, #050811 100%);
    position: relative;
}

/* CLEAN BOLD HEADER LAYOUT MATRIX */
header { 
    display: flex !important; 
    flex-direction: row !important; 
    align-items: center !important; 
    justify-content: space-between !important; 
    width: 100% !important; 
    padding-bottom: 16px !important; 
    border-bottom: 2px solid rgba(255, 255, 255, 0.08) !important; 
    gap: 12px !important;
}
.header-title { 
    font-size: 24px; 
    font-weight: 800; 
    color: #ffffff; 
    letter-spacing: -0.6px;
    white-space: nowrap;
}
.header-sub { 
    font-size: 16px; 
    color: #38bdf8; 
    font-weight: 700; 
    letter-spacing: 0.4px; 
    margin-top: 4px; 
}
.back-nav { display: flex; align-items: center; gap: 14px; min-width: 0; overflow: hidden; }
.back-btn { color: #38bdf8; font-size: 20px; cursor: pointer; flex-shrink: 0; }

/* 📱 MAIN SCREEN VIEW: HOMEPAGE VERTICAL HUB BUTTON STACK */
main.menu-stack { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    padding: 16px 0; 
}

/* HIGH FIDELITY ACTION CORE CONTROLLER BUTTONS */
.app-btn {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(22, 28, 45, 0.6); 
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.app-btn:active, .unit-card:active { 
    transform: scale(0.96); 
    background: rgba(30, 41, 59, 0.85); 
    border-color: rgba(255, 255, 255, 0.15);
}
.btn-left { display: flex; align-items: center; gap: 18px; }
.floor-tag { font-size: 20px; font-weight: 900; color: #38bdf8; width: 28px; text-align: center; }
.btn-title { font-size: 16px; font-weight: 700; color: #f8fafc; }
.badge-count { font-size: 12px; font-weight: 600; color: #cbd5e1; background: rgba(15, 23, 42, 0.85); padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.05); display: flex; align-items: center; gap: 6px; }

/* DESIGN MATRICES FOR LOWER INTERFACE BASE BUTTON ROWS */
.com-btn .floor-tag { color: #60a5fa; }
.com-btn { border-color: rgba(59, 130, 246, 0.25); background: linear-gradient(135deg, rgba(30, 58, 138, 0.2) 0%, rgba(15, 23, 42, 0.5) 100%); }
.park-btn .floor-tag { color: #34d399; }
.park-btn { border-color: rgba(16, 185, 129, 0.25); background: linear-gradient(135deg, rgba(6, 78, 59, 0.2) 0%, rgba(15, 23, 42, 0.5) 100%); }
.sec-btn .floor-tag { color: #fbbf24; }
.sec-btn { border-color: rgba(245, 158, 11, 0.25); background: linear-gradient(135deg, rgba(120, 53, 15, 0.2) 0%, rgba(15, 23, 42, 0.5) 100%); }

/* 🏢 SCREEN 2 VIEW: THE 24 APARTMENTS COMPACT MATRIX GRID */
.grid-container { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    grid-template-rows: repeat(6, 1fr); 
    gap: 10px; 
    padding: 20px 0; 
    flex: 1; 
}
.unit-card { 
    background: linear-gradient(135deg, rgba(22, 28, 45, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%); 
    border: 1px solid rgba(255, 255, 255, 0.06); 
    border-radius: 16px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    position: relative; 
    cursor: pointer; 
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); 
    transition: all 0.12s ease; 
}
.card-vacant { border-color: rgba(255, 255, 255, 0.08); background: rgba(15, 23, 42, 0.4); }
.card-vacant .unit-num-lbl { color: #ffffff; text-shadow: 0 0 10px rgba(255,255,255,0.15); }
.card-vacant .unit-type-sub { color: #64748b; }
.card-airbnb { border-color: rgba(251, 191, 36, 0.4); background: linear-gradient(135deg, rgba(120, 53, 15, 0.3) 0%, rgba(22, 28, 45, 0.8) 100%); }
.card-airbnb .unit-num-lbl { color: #fbbf24; text-shadow: 0 0 15px rgba(251, 191, 36, 0.5); }
.card-airbnb .unit-type-sub { color: #fbbf24; opacity: 0.9; font-weight: 800; }
.card-stable { border-color: rgba(16, 185, 129, 0.4); background: linear-gradient(135deg, rgba(6, 78, 59, 0.25) 0%, rgba(22, 28, 45, 0.8) 100%); }
.card-stable .unit-num-lbl { color: #10b981; text-shadow: 0 0 15px rgba(16, 185, 129, 0.5); }
.card-stable .unit-type-sub { color: #10b981; opacity: 0.9; font-weight: 800; }
.unit-num-lbl { font-size: 20px; font-weight: 900; letter-spacing: -0.5px; }
.unit-type-sub { font-size: 10px; font-weight: 700; margin-top: 3px; text-transform: uppercase; letter-spacing: 0.6px; }

/* 🏢 SCREEN 3 VIEW: MASTER COMPACT UNIT DETAILS SHEET */
.detail-card { 
    background: rgba(22, 28, 45, 0.6); 
    border: 1px solid rgba(255, 255, 255, 0.06); 
    border-radius: 16px; 
    padding: 18px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); 
    display: flex; 
    flex-direction: column; 
    gap: 14px; 
}
.data-field-group { border-bottom: 1px solid rgba(255,255,255,0.03); padding-bottom: 10px; }
.field-title { font-size: 11px; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.display-value { font-size: 16px; font-weight: 800; color: #ffffff; padding: 2px 0; }

/* RE-CALIBRATED INPUT FIELDS LOGIC */
.input-field { 
    width: 100%; 
    padding: 10px; 
    background: #050811; 
    border: 1px solid #38bdf8; 
    border-radius: 8px; 
    color: #fff; 
    font-size: 15px; 
    font-weight: 700; 
    display: none; 
    margin-top: 4px; 
}
.action-row { display: flex; gap: 12px; margin-top: 8px; }
.action-link-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 12px; font-size: 14px; font-weight: 700; text-decoration: none; transition: transform 0.1s ease; cursor: pointer; border: none; }
.action-link-btn:active { transform: scale(0.96); }

.wa-btn { background: #10b981; color: #fff; }
.mail-btn { background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.3); color: #38bdf8; }
.edit-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: #94a3b8; width: 100%; }
.save-btn { background: #38bdf8; color: #050811; width: 100%; display: none; }

/* SHARED SYSTEM STATUS FOOTER */
footer { 
    display: flex; 
    justify-content: space-between; 
    padding-top: 12px; 
    border-top: 1px solid rgba(255, 255, 255, 0.05); 
    font-family: monospace; 
    font-size: 11px; 
    color: #64748b; 
    letter-spacing: 0.2px;
}
