* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #7c4dff;
    --dark-purple: #6a3de8;
    --primary-teal: #26c6da;
    --dark-teal: #00acc1;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --sidebar-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #e0e0e0;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ff9800;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #f3e5f5 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #7c4dff 0%, #6a3de8 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    gap: 10px;
}

.header .logo i {
    font-size: 28px;
}

.header .user-info {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header .user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header .user-profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.header .user-details h4 {
    font-size: 14px;
    font-weight: 500;
}

.header .user-details p {
    font-size: 11px;
    opacity: 0.8;
}

.header .header-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header .icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 18px;
}

.header .icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Teal Navigation Bar */
.teal-nav {
    background: linear-gradient(135deg, #26c6da 0%, #00acc1 100%);
    padding: 5px 30px;
    /* Further reduced height */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 70px;
    z-index: 99;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 16px;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-title {
    margin-left: 15px;
    color: white;
}

.nav-title h2 {
    font-size: 20px;
    margin: 0;
    font-weight: 600;
}

.breadcrumb-nav {
    font-size: 12px;
    opacity: 0.9;
}

.nav-right .nav-search {
    display: flex;
    gap: 5px;
}

.nav-search input {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    width: 250px;
    font-size: 13px;
}

.nav-search input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.nav-search button {
    background: #f44336;
    border: none;
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.nav-search button:hover {
    background: #e53935;
    transform: translateY(-2px);
}

/* Main Layout */
.main-container {
    display: flex;
    min-height: calc(100vh - 125px);
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: white;
    box-shadow: var(--shadow);
    padding: 20px 0;
    position: sticky;
    top: 125px;
    height: calc(100vh - 125px);
    overflow-y: auto;
}

.sidebar .menu-item {
    list-style: none;
    margin: 5px 0;
}

.sidebar .menu-item a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.sidebar .menu-item a i {
    font-size: 18px;
    width: 20px;
}

.sidebar .menu-item a:hover {
    background: linear-gradient(90deg, rgba(124, 77, 255, 0.1) 0%, transparent 100%);
    color: var(--primary-purple);
}

.sidebar .menu-item a.active {
    background: linear-gradient(90deg, rgba(124, 77, 255, 0.15) 0%, transparent 100%);
    color: var(--primary-purple);
    border-left: 3px solid var(--primary-purple);
}

.sidebar .menu-item .badge {
    margin-left: auto;
    background: #f44336;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    color: var(--text-dark);
    font-weight: 600;
}

.breadcrumb {
    color: var(--text-light);
    font-size: 14px;
}

.search-bar {
    display: flex;
    gap: 10px;
}

.search-bar input {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    width: 300px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.1);
}

.search-bar button {
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.search-bar button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Account Information Card - Enhanced */
.account-info-card {
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.05) 0%, rgba(38, 198, 218, 0.05) 100%);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.account-header h2 {
    font-size: 22px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-header h2 i {
    color: var(--primary-purple);
    font-size: 28px;
}

.badge-online {
    background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: pulse 2s infinite;
}

.badge-online i {
    font-size: 8px;
    animation: blink 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.account-item {
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.account-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.account-item:hover::before {
    left: 100%;
}

.account-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.account-purple {
    background: linear-gradient(135deg, #7c4dff 0%, #6a3de8 100%);
    color: white;
}

.account-teal {
    background: linear-gradient(135deg, #26c6da 0%, #00acc1 100%);
    color: white;
}

.account-green {
    background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
    color: white;
}

.account-orange {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.account-icon {
    font-size: 36px;
    opacity: 0.9;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.account-info {
    flex: 1;
}

.account-label {
    font-size: 12px;
    opacity: 0.85;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-value {
    font-size: 22px;
    font-weight: 700;
    text-transform: capitalize;
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInUp 0.5s ease;
    animation-fill-mode: both;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.stat-card .stat-change {
    font-size: 12px;
    color: var(--success);
    font-weight: 600;
}

.stat-card .stat-change.negative {
    color: var(--danger);
}

.stat-card .chart-mini {
    height: 80px;
    margin-top: 15px;
    max-height: 80px;
    overflow: hidden;
}

/* Enhanced Stat Cards */
.stat-gradient-orange {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.stat-gradient-blue {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
}

.stat-gradient-purple {
    background: linear-gradient(135deg, #7c4dff 0%, #6a3de8 100%);
    color: white;
}

.stat-gradient-teal {
    background: linear-gradient(135deg, #26c6da 0%, #00acc1 100%);
    color: white;
}

.stat-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 48px;
    opacity: 0.2;
    animation: rotate360 20s linear infinite;
}

@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.stat-content {
    position: relative;
    z-index: 1;
}

.stat-content h3 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
}

.stat-content .stat-value {
    color: white;
    font-size: 36px;
    margin-bottom: 10px;
}

.stat-change {
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
}

.stat-change.positive {
    color: #fff;
}

.stat-change i {
    font-size: 11px;
}

.stat-metrics {
    display: flex;
    gap: 25px;
    margin: 15px 0;
}

.metric-item {
    flex: 1;
}

.metric-label {
    font-size: 11px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 22px;
    font-weight: 700;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 600;
}

/* Glass Effect Cards */
.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
}

.glass-effect:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header-enhanced h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: var(--text-dark);
}

.card-header-enhanced h2 i {
    color: var(--primary-purple);
}

.time-badge {
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.1) 0%, rgba(38, 198, 218, 0.1) 100%);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-container-enhanced {
    height: 200px;
    margin-bottom: 20px;
    position: relative;
}

.sales-summary {
    display: flex;
    justify-content: space-around;
    padding-top: 20px;
    border-top: 2px solid rgba(0, 0, 0, 0.05);
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.summary-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.summary-value.positive {
    color: var(--success);
}

.legend-items {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.stat-value-large {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
}

.chart-container-large {
    height: 250px;
    margin-top: 20px;
}

/* Counter Animation */
.counter-animate {
    display: inline-block;
}

/* Pulse Animation */
.animate-pulse {
    animation: pulseIcon 2s ease-in-out infinite;
}

@keyframes pulseIcon {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.chart-container {
    height: 300px;
    position: relative;
}

/* Login & Register Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card .logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.auth-card .logo-section h1 {
    color: var(--primary-purple);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-card .logo-section p {
    color: var(--text-light);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.1);
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #7c4dff 0%, #6a3de8 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(124, 77, 255, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--text-light);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.credentials-display {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px solid #4caf50;
}

.credentials-display h3 {
    color: #2e7d32;
    margin-bottom: 15px;
}

.credentials-display p {
    margin: 8px 0;
    font-size: 14px;
}

.credentials-display strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .two-column {
        grid-template-columns: 1fr;
    }

    .account-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
    }

    .dashboard-content {
        padding: 20px;
    }

    /* Mobile Responsive Styles - Enhanced */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .account-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .dashboard-content {
        padding: 15px;
    }

    .header {
        padding: 10px 15px;
        flex-wrap: wrap;
    }
    
    .header .logo span {
        font-size: 16px;
    }

    .header .user-details {
        display: none;
    }
    
    .header .user-info {
        gap: 10px;
    }
    
    .header .header-icons {
        gap: 8px;
    }
    
    .teal-nav {
        padding: 10px 15px;
        top: 60px;
    }
    
    .nav-title h2 {
        font-size: 16px;
    }
    
    .breadcrumb-nav {
        font-size: 11px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-header h1 {
        font-size: 22px;
    }

    .search-bar {
        flex-direction: column;
        width: 100%;
    }

    .search-bar input {
        width: 100%;
    }
    
    .two-column {
        grid-template-columns: 1fr;
    }
    
    .account-info-card {
        padding: 20px 15px;
    }
    
    .account-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .account-header h2 {
        font-size: 18px;
    }
    
    .account-item {
        padding: 20px 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-value {
        font-size: 28px !important;
    }
    
    /* NSDL Card internal grid - mobile stacked */
    .stat-card .stat-content > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 10px;
}


::-webkit-scrollbar-thumb:hover {
    background: var(--dark-purple);
}