/* Society Management App - Premium Admin Panel Styling */

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

:root {
    --hue-primary: 245; /* Indigo */
    
    --bg-primary: #f4f6fa;
    --bg-secondary: rgba(255, 255, 255, 0.55);
    --bg-surface: rgba(241, 245, 249, 0.6);
    --bg-glass: rgba(255, 255, 255, 0.45);
    --border-glass: rgba(255, 255, 255, 0.55);
    --border-color: rgba(15, 23, 42, 0.06);
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.15);
    
    --success: #10b981;
    --success-hover: #059669;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --box-shadow-premium: 0 10px 30px -10px rgba(15, 23, 42, 0.04), 0 1px 1px 0 rgba(255, 255, 255, 0.8) inset;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    outline: none;
    font-family: inherit;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.12);
    border-radius: 20px;
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.25);
    border: 2px solid transparent;
    background-clip: content-box;
}

/* Background Blobs */
.blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.22;
    animation: floatBlob 25s ease-in-out infinite alternate;
}

.blob-1 {
    background: radial-gradient(circle, rgba(99,102,241,0.6) 0%, rgba(99,102,241,0) 70%);
    top: -15%;
    left: -10%;
    animation-delay: 0s;
}

.blob-2 {
    background: radial-gradient(circle, rgba(6,182,212,0.5) 0%, rgba(6,182,212,0) 70%);
    bottom: -15%;
    right: -10%;
    animation-duration: 30s;
    animation-delay: -5s;
}

.blob-3 {
    background: radial-gradient(circle, rgba(236,72,153,0.35) 0%, rgba(236,72,153,0) 70%);
    top: 35%;
    left: 45%;
    width: 450px;
    height: 450px;
    animation-duration: 20s;
    animation-delay: -10s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0px, 0px) scale(1) rotate(0deg);
    }
    33% {
        transform: translate(70px, -90px) scale(1.12) rotate(120deg);
    }
    66% {
        transform: translate(-60px, 60px) scale(0.9) rotate(240deg);
    }
    100% {
        transform: translate(0px, 0px) scale(1) rotate(360deg);
    }
}

/* Base Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.sidebar-logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    gap: 12px;
}

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

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px; /* Modern rounded square instead of circle */
    background: linear-gradient(135deg, #6366f1, #06b6d4, #ec4899, #6366f1);
    background-size: 300% 300%;
    animation: gradientBG 5s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
    font-weight: 800;
    color: #fff;
    font-size: 1.25rem;
    transform: rotate(-3deg);
    transition: var(--transition-smooth);
}

.sidebar-logo:hover .logo-icon {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.55);
}

.logo-text {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #4f46e5, #06b6d4, #4f46e5);
    background-size: 200% auto;
    animation: gradientBG 4s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(99, 102, 241, 0.05);
}

.sidebar-menu {
    flex: 1;
    padding: 24px 16px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    gap: 14px;
    position: relative;
    transition: var(--transition-smooth);
}

.sidebar-item a:hover {
    color: #4f46e5;
    background-color: rgba(99, 102, 241, 0.06);
    transform: translateX(6px);
}

.sidebar-item.active a {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.22);
    color: #ffffff;
}

.sidebar-item.active a svg {
    stroke: #ffffff;
}

.sidebar-item svg, .logout-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    transition: var(--transition-smooth);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.6);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    color: #ef4444;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.15);
    font-weight: 500;
    font-size: 0.95rem;
    gap: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.05);
    border-color: #ef4444;
    transform: translateY(-1px);
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
}

.user-info {
    font-size: 0.9rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Content Frame */
.content-body {
    padding: 40px;
    flex: 1;
}

/* Alert Notification Banner */
.alert-banner {
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
    margin-bottom: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.08);
    color: var(--success-hover);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Cards System */
.glass-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.04), 
                0 1px 1px 0 rgba(255, 255, 255, 0.8) inset,
                0 0 0 1px rgba(15, 23, 42, 0.01);
    margin-bottom: 24px;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.65);
    transform: translateY(-4px) scale(1.005);
    box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.12),
                0 1px 2px 0 rgba(255, 255, 255, 0.9) inset,
                0 0 0 1px rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.stat-card.primary .stat-icon { 
    color: #ffffff; 
    background: linear-gradient(135deg, #6366f1, #4f46e5); 
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.25);
}
.stat-card.success .stat-icon { 
    color: #ffffff; 
    background: linear-gradient(135deg, #10b981, #059669); 
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.25);
}
.stat-card.warning .stat-icon { 
    color: #ffffff; 
    background: linear-gradient(135deg, #f59e0b, #d97706); 
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.25);
}
.stat-card.danger .stat-icon { 
    color: #ffffff; 
    background: linear-gradient(135deg, #ef4444, #dc2626); 
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.25);
}
.stat-card.info .stat-icon { 
    color: #ffffff; 
    background: linear-gradient(135deg, #0ea5e9, #0284c7); 
    box-shadow: 0 8px 16px rgba(14, 165, 233, 0.25);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
}

/* Dashboard Grid Layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.grid-full {
    grid-template-columns: 1fr;
}

/* Section Header */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Forms & UI Inputs */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.form-control {
    background-color: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--border-radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.01);
}

.form-control:focus {
    background-color: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12), 0 4px 12px rgba(99, 102, 241, 0.05);
}

select.form-control option {
    background-color: #ffffff;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    background-size: 200% auto;
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
    background-position: right center;
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.06);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.05);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
}

/* Tables System */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(15, 23, 42, 0.05);
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.custom-table th {
    padding: 14px 16px;
    border-bottom: 2px solid rgba(15, 23, 42, 0.06);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: rgba(241, 245, 249, 0.6);
}

.custom-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
    color: var(--text-primary);
    vertical-align: middle;
}

.custom-table tbody tr {
    transition: var(--transition-smooth);
}

.custom-table tbody tr:hover {
    background-color: rgba(79, 70, 229, 0.015);
}

/* Badges Statuses */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.badge-pending { background-color: rgba(245, 158, 11, 0.08); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.15); }
.badge-approved { background-color: rgba(16, 185, 129, 0.08); color: var(--success-hover); border: 1px solid rgba(16, 185, 129, 0.15); }
.badge-denied { background-color: rgba(239, 68, 68, 0.08); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.15); }
.badge-exited { background-color: rgba(148, 163, 184, 0.08); color: var(--text-secondary); border: 1px solid rgba(148, 163, 184, 0.15); }
.badge-primary { background-color: rgba(79, 70, 229, 0.08); color: var(--primary); border: 1px solid rgba(79, 70, 229, 0.15); }
.badge-success { background-color: rgba(16, 185, 129, 0.08); color: var(--success-hover); border: 1px solid rgba(16, 185, 129, 0.15); }

/* Feed Lists */
.feed-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--primary);
    transition: var(--transition-smooth);
}

.feed-item:hover {
    transform: translateX(4px);
}

.feed-item.maintenance { border-left-color: var(--warning); }
.feed-item.event { border-left-color: var(--success); }

.feed-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feed-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.feed-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 2px;
}

/* Authentication Page layout */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background-color: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.12),
                0 0 0 1px rgba(15, 23, 42, 0.02);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    position: relative;
    z-index: 10;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(to right, #6366f1, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Pagination container */
.pagination-wrapper {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.pagination-wrapper nav svg {
    width: 20px;
    height: 20px;
}

/* Chart Canvas container */
.chart-container {
    position: relative;
    height: 260px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive details */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-wrapper {
        margin-left: 0;
    }
    .header {
        padding: 0 20px;
    }
    .content-body {
        padding: 20px;
    }
}

/* Modal System Overlay & Card Box */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 550px;
    padding: 28px;
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.15),
                0 0 0 1px rgba(15, 23, 42, 0.02);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.25s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--danger);
}

