/* =========================================
   GLOBAL CSS - Paysaral Super Admin
   (Variables, Base, Header, Sidebar, Page Header, Buttons)
   ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

:root {
    --primary-teal: #009688;       
    --deep-menu: #004D40;          
    --accent-green: #67C949;       
    --bg-color: #F5F6FA;           
    --dark-sidebar: #004D40; 
    --card-bg: #FFFFFF;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #EAEAEA;
    --highlight-color: #FFD54F; 
}

/* --- Base Layout --- */
html {
    background-color: var(--bg-color); 
    background-image: linear-gradient(to right, var(--dark-sidebar) 0px, var(--dark-sidebar) 250px, transparent 250px);
    background-repeat: repeat-y; 
    min-height: 100%;
}

body {
    background-color: transparent; 
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-width: 1366px; 
    min-height: 100vh;
    -webkit-text-size-adjust: 100%; 
    overflow: auto; 
}

/* --- TOP HEADER --- */
.top-header {
    background-color: var(--primary-teal);
    min-height: 60px; 
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding-right: 20px; 
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 1366px; 
    position: sticky;
    top: 0;
}

.logo-area {
    width: 250px; 
    min-width: 250px; 
    background-color: #FFFFFF; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 0 20px;
}

.main-logo {
    height: 40px; 
    max-width: 100%; 
    object-fit: contain; 
}

/* Top Nav (Mobile friendly wrap restored) */
.top-nav {
    flex: 1; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 5px 8px; 
    padding: 10px 10px 10px 30px; 
    align-items: center;
}

.top-nav a {
    color: #FFFFFF !important; 
    text-decoration: none; 
    font-size: 13px; 
    font-weight: 400 !important; 
    letter-spacing: 0.3px; 
    white-space: nowrap;
    transition: all 0.3s ease; 
    padding: 6px 12px; 
    border-radius: 8px; 
}

.top-nav a:hover {
    background-color: rgba(255, 255, 255, 0.15); 
}

.top-nav a.active {
    background-color: #FFFFFF; 
    color: var(--primary-teal) !important; 
    font-weight: 600 !important; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.wallet-area {
    display: flex; 
    gap: 15px; 
    align-items: center; 
    padding: 10px 0; 
}

.wallet-box {
    background-color: var(--card-bg); 
    color: var(--accent-green);
    padding: 6px 20px; 
    border-radius: 6px; 
    text-align: right;
    display: flex; 
    flex-direction: column; 
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 44px; 
}

.wallet-title {
    font-size: 11px; 
    font-weight: 500; 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    color: var(--text-muted); 
}

.wallet-amount {
    font-size: 15px; 
    font-weight: 400; 
    color: #004D40; 
}

/* --- MAIN WRAPPER & SIDEBAR --- */
.main-wrapper {
    display: flex; 
    min-width: 1366px; 
    min-height: calc(100vh - 60px); 
    align-items: flex-start; 
    background-color: transparent; 
}

.sidebar {
    width: 250px; 
    min-width: 250px; 
    background-color: var(--dark-sidebar); 
    color: white; 
    display: flex; 
    flex-direction: column;
    position: sticky; 
    top: 60px; 
    height: calc(100vh - 60px);
    overflow-y: auto; 
    overscroll-behavior: contain; 
    z-index: 900;
}

.sidebar::-webkit-scrollbar {
    width: 5px; 
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2); 
    border-radius: 10px; 
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4); 
}

.profile-card {
    background-color: rgba(255, 255, 255, 0.1); 
    color: white;
    margin: 15px; 
    padding: 15px; 
    border-radius: 6px; 
    border-left: 4px solid var(--accent-green);
    flex-shrink: 0; 
}

.welcome-text {
    font-size: 14px; 
    font-weight: 500; 
    margin-bottom: 5px; 
}

.welcome-text .highlight {
    color: var(--accent-green); 
    font-weight: 700; 
}

.time-text {
    font-size: 12px; 
    color: rgba(255, 255, 255, 0.7); 
    display: flex; 
    align-items: center; 
    gap: 5px; 
}

/* --- Side Menu --- */
.side-menu {
    list-style: none; 
    padding: 0; 
    margin-top: 10px; 
}

.side-menu > li {
    border-bottom: 1px solid rgba(0, 150, 136, 0.4); 
    box-shadow: 0 1px 2px rgba(0, 150, 136, 0.2); 
}

.side-menu > li:last-child {
    border-bottom: none; 
    box-shadow: none; 
}

.side-menu a {
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 14px 20px; 
    color: rgba(255, 255, 255, 0.85); 
    text-decoration: none; 
    font-size: 13px; 
    font-weight: 400;
    border-left: 3px solid transparent; 
    transition: all 0.3s ease; 
}

.side-menu .menu-left {
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.side-menu .menu-left i {
    font-size: 14px; 
    width: 20px; 
    text-align: center; 
}

.side-menu .chevron {
    font-size: 10px; 
    opacity: 0.3; 
    transition: opacity 0.3s ease, color 0.3s ease; 
}

.side-menu > li > a:hover, 
.side-menu > li > a.active {
    background-color: rgba(255, 255, 255, 0.05); 
    color: white; 
    border-left: 3px solid var(--accent-green); 
}

.side-menu > li > a.active .menu-left i {
    color: var(--accent-green); 
}

.side-menu > li > a:hover .chevron, 
.side-menu > li > a.active .chevron {
    opacity: 1; 
    color: var(--accent-green); 
}

/* --- Sub-Menu Styles --- */
.sub-menu {
    list-style: none;
    background-color: rgba(0, 0, 0, 0.15); 
    display: block; 
}

.sub-menu > li {
    border-bottom: none;
    box-shadow: none;
}

.sub-menu a {
    padding: 10px 20px 10px 45px; 
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    border-left: 3px solid transparent;
}

.sub-menu a i {
    margin-right: 8px;
    width: auto;
}

.sub-menu a:hover, 
.sub-menu a.active {
    background-color: transparent;
    color: var(--accent-green);
    border-left: 3px solid var(--accent-green);
}

/* =========================================
   RESTORED: GLOBAL CONTENT AREA & PAGE HEADER
   ========================================= */

/* --- Content Area Layout --- */
.content-area {
    flex: 1; 
    padding: 24px; 
    min-width: 1116px; 
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px); 
    overflow: hidden; 
    overflow-y: auto; 
}

.content-area::-webkit-scrollbar {
    width: 6px; 
}

.content-area::-webkit-scrollbar-track {
    background: transparent; 
}

.content-area::-webkit-scrollbar-thumb {
    background: #CBD5E1; 
    border-radius: 10px; 
}

.content-area::-webkit-scrollbar-thumb:hover {
    background: var(--deep-menu); 
}

/* --- THE PREMIUM PAGE HEADER --- */
.page-header {
    background-color: var(--deep-menu); 
    padding: 14px 16px; 
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); 
    border-left: 4px solid var(--highlight-color); 
    margin-bottom: 20px; 
    flex-shrink: 0; 
}

.page-title {
    font-size: 17px; 
    font-weight: 700; 
    color: #FFFFFF; 
    margin-bottom: 2px; 
}

.page-subtitle {
    font-size: 11px; 
    color: rgba(255, 255, 255, 0.8); 
}

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

/* --- COMMON BUTTONS (Used across all pages) --- */
.btn-primary {
    background-color: var(--primary-teal); 
    color: white; 
    border: none; 
    padding: 10px 18px; 
    border-radius: 6px; 
    font-size: 13px; 
    font-weight: 500; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    transition: background-color 0.3s; 
}

.btn-primary:hover {
    background-color: #00796B; 
}

.btn-green {
    background-color: #67C949; 
    color: white; 
    border: none; 
    padding: 10px 18px; 
    border-radius: 6px; 
    font-size: 13px; 
    font-weight: 500; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    transition: background-color 0.3s, box-shadow 0.3s; 
}

.btn-green:hover {
    background-color: #059669; 
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); 
}

.btn-teal-outline {
    background-color: rgba(255, 255, 255, 0.1); 
    color: white; 
    border: 1px solid rgba(255, 255, 255, 0.5); 
    padding: 9px 18px; 
    border-radius: 6px; 
    font-size: 13px; 
    font-weight: 500; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    transition: all 0.3s; 
    height: 38px; 
}

.btn-teal-outline:hover {
    background-color: white; 
    color: var(--deep-menu); 
}