/* =========================================
DOCNECT – FINAL PRODUCTION UI (SAFE AREA READY)
========================================= */

:root{
--primary:#1e6eea;
--bg:#f4f6fb;
--white:#ffffff;
--text:#111;
--muted:#8e8e93;
}

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

html{
height:100%;
}

body{
font-family:-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif;
background:var(--bg);
color:var(--text);
overflow-x:hidden;
min-height:100%;
}

/* ================= HEADER ================= */
.app-header{
position:fixed;
top:0;
left:0;
width:100%;
background:#fff;

display:flex;
align-items:center;
justify-content:space-between;

/* SAFE AREA SUPPORT */
padding:env(safe-area-inset-top) 15px 0 15px;
height:calc(60px + env(safe-area-inset-top));

box-shadow:0 2px 10px rgba(0,0,0,0.05);
z-index:2000;
}

/* LEFT MENU */
.menu-icon{
position:absolute;
left:15px;
top:calc(18px + env(safe-area-inset-top));
font-size:22px;
cursor:pointer;
}

/* RIGHT ICON */
.search-icon{
position:absolute;
right:15px;
top:calc(18px + env(safe-area-inset-top));
font-size:22px;
cursor:pointer;
}

/* LOGO CENTER */
.logo{
position:absolute;
left:50%;
top:calc(14px + env(safe-area-inset-top));
transform:translateX(-50%);
}

.logo img{
height:32px;
}

/* ================= SIDEBAR ================= */
.sidebar{
position:fixed;
top:0;
left:-85%;
width:80%;
max-width:320px;
height:100%;
background:#fff;
transition:.3s ease;
z-index:2100;
box-shadow:4px 0 25px rgba(0,0,0,.15);
padding-top:env(safe-area-inset-top);
}

.sidebar.active{
left:0;
}

.sidebar-header{
background:linear-gradient(135deg,#1e6eea,#1559c9);
padding:25px 20px;
color:#fff;
}

.sidebar-menu a{
display:flex;
align-items:center;
padding:15px 20px;
text-decoration:none;
color:#111;
}

.sidebar-menu a i{
margin-right:12px;
}

/* ================= OVERLAY ================= */
.overlay{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,.4);
opacity:0;
visibility:hidden;
transition:.3s;
z-index:1500;
}

.overlay.active{
opacity:1;
visibility:visible;
}

/* ================= SEARCH ================= */
.search-box{
position:fixed;
left:0;
width:100%;
background:#fff;
padding:12px;
transition:.3s;
z-index:2000;
top:calc(-100px + env(safe-area-inset-top));
}

.search-box.active{
top:calc(60px + env(safe-area-inset-top));
}

.search-box input{
width:100%;
padding:12px;
border-radius:10px;
border:1px solid #ddd;
}

.search-results{
background:#fff;
border-radius:10px;
margin-top:5px;
max-height:250px;
overflow-y:auto;
}

.result-item{
padding:12px;
border-bottom:1px solid #eee;
cursor:pointer;
}

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

/* ================= CONTENT ================= */
.app-content{
padding:20px;
padding-top:calc(80px + env(safe-area-inset-top));
padding-bottom:calc(90px + env(safe-area-inset-bottom));
min-height:100vh;
}

.welcome{
font-size:22px;
font-weight:600;
margin-bottom:25px;
text-align:center;
}

.grid{
display:grid;
grid-template-columns:repeat(2,1fr);
gap:18px;
}

.home-card{
background:#fff;
border-radius:22px;
padding:25px 10px;
text-align:center;
box-shadow:0 8px 20px rgba(0,0,0,.05);
text-decoration:none;
color:#111;
}

.home-card span{
font-size:45px;
display:block;
margin-bottom:10px;
}

/* ================= BOTTOM NAV ================= */
.bottom-nav{
position:fixed;
bottom:0;
left:0;
width:100%;
background:#fff;
border-top:1px solid #eee;

display:flex;
justify-content:space-around;
align-items:center;

/* SAFE AREA SUPPORT */
padding-bottom:env(safe-area-inset-bottom);
height:calc(65px + env(safe-area-inset-bottom));

z-index:1000;
}

.bottom-nav a{
text-align:center;
text-decoration:none;
color:var(--muted);
font-size:18px;
}

.bottom-nav a span{
display:block;
font-size:11px;
}

.bottom-nav a.active{
color:var(--primary);
}