:root {
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --webappzo-blue: #0071e3;
    --webappzo-red: #ff3b30;
    --sidebar-w: 260px;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-sidebar: rgba(242, 242, 247, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    --list-bg: rgba(255, 255, 255, 0.7);
    --app-radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

body { 
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-main);
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* App Window */
.glass-app-container {
    width: 90vw;
    height: 85vh;
    max-width: 1200px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--app-radius);
    box-shadow: var(--glass-shadow);
    display: flex;
    overflow: hidden;
}

/* Sidebar */
.glass-sidebar {
    width: var(--sidebar-w);
    background: var(--glass-sidebar);
    border-right: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
}

.sidebar-header { display: flex; align-items: center; gap: 12px; padding: 0 8px 20px 8px; margin-bottom: 10px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.top-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: white; }
.top-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info strong { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.user-info span { font-size: 12px; color: var(--text-muted); }

.nav-group { margin-bottom: 20px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--text-main); font-size: 14px; font-weight: 500; transition: background 0.2s; margin-bottom: 2px; }
.nav-item:hover, .nav-item.active { background: rgba(0,0,0,0.06); }
.icon-wrap { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: white; font-size: 14px; }

/* Icon Colors */
.bg-gray { background: #8e8e93; }
.bg-blue { background: #007aff; }
.bg-cyan { background: #32ade6; }
.bg-indigo { background: #5856d6; }
.bg-green { background: #34c759; }
.bg-red { background: #ff3b30; }
.bg-orange { background: #ff9500; }

/* Main Content */
.glass-main { flex: 1; padding: 40px; overflow-y: auto; }
.glass-page-header { margin-bottom: 30px; text-align: center; }
.glass-page-header h2 { font-size: 28px; font-weight: 600; margin-bottom: 8px; }
.glass-page-header p { font-size: 15px; color: var(--text-muted); }

/* Settings Groups styling used extensively in app */
.glass-settings-group { background: var(--list-bg); border-radius: 10px; overflow: hidden; margin-bottom: 24px; max-width: 680px; margin-left: auto; margin-right: auto; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.setting-row { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid rgba(0,0,0,0.05); background: transparent; cursor: pointer; transition: background 0.2s; }
.setting-row:last-child { border-bottom: none; }
.setting-row:hover { background: rgba(0,0,0,0.02); }

.setting-icon.avatar { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; margin-right: 16px; }
.setting-icon.avatar img { width: 100%; height: 100%; object-fit: cover; }
.setting-icon:not(.avatar) { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; margin-right: 16px; font-size: 14px; }

.setting-content { flex: 1; }
.setting-content strong { display: block; font-size: 16px; font-weight: 400; }
.setting-content p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.setting-value { font-size: 16px; color: var(--text-muted); margin-right: 12px; }
.fa-chevron-right { font-size: 12px; color: #c7c7cc; }

/* Modal overlay with blurring */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.login-card { background: rgba(255,255,255,0.85); padding: 40px; border-radius: 16px; width: 100%; max-width: 360px; text-align: center; box-shadow: var(--glass-shadow); border: 1px solid var(--glass-border); }
.login-card h2 { font-size: 24px; font-weight: 500; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group input { width: 100%; padding: 12px 16px; border: 1px solid rgba(0,0,0,0.1); border-radius: 8px; font-size: 15px; background: rgba(255,255,255,0.5); outline: none; }
.form-group input:focus { border-color: var(--webappzo-blue); box-shadow: 0 0 0 3px rgba(0,113,227,0.2); }
.btn-primary { width: 100%; background: var(--webappzo-blue); color: white; border: none; padding: 12px; border-radius: 8px; font-size: 16px; font-weight: 500; cursor: pointer; margin-top: 10px; }

.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.5); backdrop-filter: blur(5px); z-index: 2000; display: flex; justify-content: center; align-items: center; }
.spinner { width: 30px; height: 30px; border: 3px solid rgba(0,0,0,0.1); border-top: 3px solid var(--text-muted); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Responsive adjustments */
@media(max-width: 768px) {
    .glass-app-container { width: 100vw; height: 100vh; border-radius: 0; flex-direction: column; }
    .glass-sidebar { width: 100%; border-right: none; border-bottom: 1px solid rgba(0,0,0,0.05); flex-direction: row; align-items: center; padding: 12px; overflow-x: auto; }
    .sidebar-header { border-bottom: none; margin-bottom: 0; padding: 0 16px 0 0; border-right: 1px solid rgba(0,0,0,0.05); }
    .top-avatar { width: 36px; height: 36px; }
    .user-info strong, .user-info span, .nav-item .nav-label { display: none; }
    .nav-group { display: flex; margin-bottom: 0; padding-left: 12px; border-right: 1px solid rgba(0,0,0,0.05); margin-right: 12px; }
    .nav-item { padding: 8px; margin-bottom: 0; margin-right: 8px; }
    .glass-main { padding: 20px; }
}
