/* ==========================================================================
   HEARTFULNESS SIMHASTHA 2028 DIGITAL SERVICE PORTAL - CSS STYLESHEET
   ========================================================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Color Variables and Themes */
:root {
    /* Color Palette */
    --hfn-blue: #0F4C81;
    --hfn-blue-rgb: 15, 76, 129;
    --sky-blue: #EAF2F8;
    --peace-accent: #2C7BE5;
    --peace-accent-rgb: 44, 123, 229;
    
    /* Light Mode Default Variables */
    --bg-color: #F8F9FA;
    --card-bg: #FFFFFF;
    --text-color: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --sidebar-bg: #1E293B;
    --sidebar-text: #94A3B8;
    --sidebar-active-bg: rgba(255, 255, 255, 0.1);
    --sidebar-active-text: #FFFFFF;
    
    /* UI Dimensions & System */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --transition-speed: 0.3s;
}

/* Dark Mode Variables Override */
[data-theme="dark"] {
    --bg-color: #0F172A;
    --card-bg: #1E293B;
    --text-color: #F8FAF6;
    --text-muted: #94A3B8;
    --border-color: #334155;
    --navbar-bg: rgba(15, 23, 42, 0.95);
    --sidebar-bg: #0F172A;
    --sidebar-text: #64748B;
}

/* Base Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    font-weight: 600;
}

/* Premium Layout & Containers */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.container-fluid-custom {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Header & Glassmorphic Navigation */
.header-nav {
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    transition: background var(--transition-speed), border var(--transition-speed);
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--hfn-blue), var(--peace-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

/* Custom Soft-Theme Buttons */
.btn-premium {
    background: linear-gradient(135deg, var(--hfn-blue), var(--peace-accent));
    color: #FFFFFF;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 6px rgba(44, 123, 229, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(44, 123, 229, 0.35);
    color: #FFFFFF;
}

.btn-premium-outline {
    background: transparent;
    color: var(--peace-accent);
    border: 2px solid var(--peace-accent);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    padding: 0.5rem 1.4rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-premium-outline:hover {
    background: var(--peace-accent);
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Beautiful Cards */
.card-premium {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), background-color var(--transition-speed), border-color var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.card-premium:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--hfn-blue), var(--peace-accent));
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.card-premium.accented::before,
.card-premium:hover::before {
    opacity: 1;
}

/* Landing Page Hero Section */
.hero-section {
    background: radial-gradient(circle at 10% 20%, rgba(234, 242, 248, 0.8) 0%, rgba(255, 255, 255, 1) 90%);
    padding: 6rem 0;
    position: relative;
}

[data-theme="dark"] .hero-section {
    background: radial-gradient(circle at 10% 20%, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 1) 90%);
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-color), var(--peace-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom Interactive Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width var(--transition-speed);
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
}

/* Dynamic Forms */
.form-group-custom {
    margin-bottom: 1.25rem;
}

.form-control-custom {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--peace-accent);
    box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.15);
}

/* Elegant Tables */
.table-custom {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.table-custom th {
    background-color: rgba(var(--hfn-blue-rgb), 0.05);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.table-custom td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.table-custom tr:hover {
    background-color: rgba(var(--peace-accent-rgb), 0.02);
}

/* Dashboard Widgets & Micro-Animations */
.badge-custom {
    padding: 0.35rem 0.65rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-custom.success {
    background-color: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.badge-custom.warning {
    background-color: rgba(241, 196, 15, 0.15);
    color: #f39c12;
}

.badge-custom.danger {
    background-color: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

/* Emergency Ring / Pulse Animation */
.pulse-emergency {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* Digital ID Card Preview styles */
.id-card-container {
    width: 320px;
    height: 480px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 15px;
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.id-card-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    width: 100%;
    text-align: center;
    padding-bottom: 10px;
}

.id-card-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid white;
    background-color: #ECEFF1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #90A4AE;
    margin-bottom: 15px;
}

.id-card-details {
    text-align: center;
    margin-bottom: 20px;
}

.id-card-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.id-card-role {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #90CAF9;
    margin-bottom: 10px;
}

.id-card-info {
    font-size: 0.8rem;
    color: #E3F2FD;
}

.id-card-qr {
    background-color: white;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
}

/* Map placeholder / layout styling */
#map-container {
    height: 450px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 1;
}

/* Quick access widget tools */
.quick-action-card {
    cursor: pointer;
    border: 1px dashed var(--border-color);
    background: transparent;
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
    transition: all 0.2s;
}

.quick-action-card:hover {
    background: rgba(var(--peace-accent-rgb), 0.05);
    border-color: var(--peace-accent);
    color: var(--peace-accent);
}

/* Language selector */
.lang-dropdown-link {
    cursor: pointer;
}

/* Mobile responsive collapse adaptations */
@media(max-width: 768px) {
    .wrapper {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        padding: 1rem;
    }
    .container-fluid-custom {
        padding: 1rem;
    }
    .hero-title {
        font-size: 2.2rem;
    }
}
