/* ==========================================
   US 192 GLOBAL BRAND VARIABLES
   ========================================== */
:root {
    --brand-teal: #4CC7CE;
    --brand-teal-hover: #3BA3A9;
    --brand-teal-light: #E0F7F8;
    --bg-light: #f4f6f8;
    --text-dark: #1A202C;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
}

/* Base Defaults */
body { margin: 0; font-family: sans-serif; background-color: var(--bg-light); color: var(--text-dark); }
a { color: var(--brand-teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--brand-teal-hover); }

/* ==========================================
   LAYOUT FRAMEWORK
   ========================================== */
/* The Top Header - Now matches the App's AppBar */
.top-nav { 
    background-color: var(--brand-teal); 
    color: white;
    padding: 15px 30px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 4px 12px rgba(76, 199, 206, 0.3); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}
.top-nav .logo { font-size: 1.3em; font-weight: 900; color: white; letter-spacing: 0.5px;}
.top-nav .user-menu { font-size: 0.95em; }
.top-nav .btn-small { 
    background: white; 
    color: var(--brand-teal); 
    padding: 8px 16px; 
    border-radius: 20px; 
    font-weight: bold; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.top-nav .btn-small:hover { background: #f8fafc; }

/* The Dashboard Structure */
.dashboard-wrapper { display: flex; min-height: calc(100vh - 65px); }
.sidebar { width: 250px; background: var(--sidebar-bg); color: #fff; padding: 20px 0; flex-shrink: 0; }
.sidebar nav a { display: block; padding: 15px 25px; color: #cbd5e1; text-decoration: none; font-weight: bold; transition: 0.2s; border-left: 4px solid transparent;}
.sidebar nav a:hover { background: var(--sidebar-hover); color: white; }

/* App-Matched Active Sidebar Tab */
.sidebar nav a.active { 
    border-left: 4px solid var(--brand-teal); 
    background: var(--sidebar-hover); 
    color: var(--brand-teal); 
}

.main-content { flex: 1; padding: 30px; overflow-x: hidden; }
.breadcrumb { margin-bottom: 20px; font-size: 15px; color: #64748b; }
.breadcrumb a { font-weight: bold; }

/* ==========================================
   UI COMPONENTS & CARDS
   ========================================== */
.section-card { 
    background: #fff; 
    padding: 25px; 
    border: 1px solid #e2e8f0; 
    border-radius: 12px; 
    margin-bottom: 30px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.02); 
}

/* App-Matched Primary Buttons */
.btn-primary, .btn-save { 
    background-color: var(--brand-teal); 
    color: white; 
    padding: 12px 20px; 
    border: none; 
    border-radius: 8px; 
    font-size: 16px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: all 0.2s; 
    box-shadow: 0 2px 4px rgba(76, 199, 206, 0.4);
}
.btn-primary:hover, .btn-save:hover { 
    background-color: var(--brand-teal-hover); 
    box-shadow: 0 4px 8px rgba(76, 199, 206, 0.6);
    transform: translateY(-1px);
}

/* Forms & Inputs */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 8px; color: var(--text-dark); }
.form-control { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #cbd5e1; 
    border-radius: 8px; 
    box-sizing: border-box; 
    font-family: inherit; 
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus { 
    outline: none; 
    border-color: var(--brand-teal); 
    box-shadow: 0 0 0 3px var(--brand-teal-light);
}

/* Table Styles for Manage Merchants & Users */
table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
th { background: var(--bg-light); color: var(--text-dark); text-align: left; padding: 15px; font-weight: bold; border-bottom: 2px solid #e2e8f0; }
td { padding: 15px; border-bottom: 1px solid #e2e8f0; color: #475569; }
tr:last-child td { border-bottom: none; }
tr:hover { background-color: #f8fafc; }

/* Alerts */
.alert { padding: 15px; border-radius: 8px; margin-bottom: 20px; font-weight: bold; display: flex; align-items: center; gap: 10px;}
.success { background: #D1FAE5; color: #065F46; border: 1px solid #34D399; }
.error { background: #FEE2E2; color: #991B1B; border: 1px solid #F87171; }

/* ==========================================
   MOBILE RESPONSIVE OVERRIDES
   ========================================== */
@media (max-width: 768px) {
    .dashboard-wrapper { flex-direction: column; }
    
    /* Side Nav turns into a swipeable top nav */
    .sidebar { width: 100%; padding: 0; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 90;}
    .sidebar nav { display: flex; width: 100%; }
    .sidebar nav a { padding: 15px 20px; border-left: none; border-bottom: 4px solid transparent; display: inline-block; font-size: 14px;}
    .sidebar nav a.active { border-left: none; border-bottom: 4px solid var(--brand-teal); background: var(--sidebar-hover); color: var(--brand-teal);}
    
    /* Header Stacks */
    .top-nav { flex-direction: column; gap: 15px; padding: 15px; text-align: center; }
    .user-menu { display: flex; flex-direction: column; gap: 12px; width: 100%;}
    .user-menu .btn-small { margin-left: 0 !important; width: 100%; display: block; box-sizing: border-box; text-align: center; }
    
    /* Content Padding */
    .main-content { padding: 15px; }
    .section-card { padding: 15px; }
    
    /* Tables become scrollable horizontally */
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}