/* ==========================================================================
   LIDM Design System — Global Styles
   UPI Brand: Navy #003366 | Gold #C5A12F
   ==========================================================================*/

/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== DESIGN TOKENS ===== */
:root {
    --upi-navy: #003366;
    --upi-navy-dark: #002244;
    --upi-navy-light: #004488;
    --upi-gold: #C5A12F;
    --upi-gold-light: #D4B84A;
    --upi-gold-glow: rgba(197, 161, 47, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-bg-light: rgba(255, 255, 255, 0.85);
    --text-primary: #1a1a2e;
    --text-secondary: #555770;
    --text-muted: #8b8da3;
    --bg-light: #f8f9fc;
    --bg-section: #f0f2f8;
    --shadow-soft: 0 4px 24px rgba(0, 51, 102, 0.08);
    --shadow-card: 0 8px 32px rgba(0, 51, 102, 0.12);
    --shadow-hover: 0 16px 48px rgba(0, 51, 102, 0.18);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.25s ease;

    /* Status Colors */
    --status-draft: #f59e0b;
    --status-draft-bg: rgba(245, 158, 11, 0.1);
    --status-review: #f97316;
    --status-review-bg: rgba(249, 115, 22, 0.1);
    --status-approved: #22c55e;
    --status-approved-bg: rgba(34, 197, 94, 0.1);
    --status-rejected: #ef4444;
    --status-rejected-bg: rgba(239, 68, 68, 0.1);
    --status-info: #3b82f6;
    --status-info-bg: rgba(59, 130, 246, 0.1);
}

/* ===== BASE ===== */
body {
    font-family: 'Inter', 'Maven Pro', sans-serif;
    overflow-x: hidden;
    color: var(--text-primary);
}

/* ===== SECTION UTILITIES ===== */
.lidm-section {
    padding: 100px 0;
}

.lidm-section-sm {
    padding: 60px 0;
}

.lidm-section-bg {
    background: var(--bg-light);
}

.lidm-section-dark {
    background: linear-gradient(135deg, var(--upi-navy-dark) 0%, var(--upi-navy) 100%);
    color: #fff;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    margin-bottom: 56px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(0, 51, 102, 0.06);
    border-radius: 50px;
    color: var(--upi-navy);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Maven Pro', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
}

.section-desc.centered {
    margin: 0 auto;
}

/* Dark section overrides */
.lidm-section-dark .section-label {
    background: rgba(197, 161, 47, 0.15);
    color: var(--upi-gold-light);
}

.lidm-section-dark .section-title {
    color: #fff;
}

.lidm-section-dark .section-desc {
    color: rgba(255,255,255,0.6);
}

/* ===== PAGE HEADER ===== */
.lidm-page-header {
    background: linear-gradient(135deg, var(--upi-navy-dark), var(--upi-navy), var(--upi-navy-light));
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
}

.lidm-page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(197, 161, 47, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(100, 180, 255, 0.1) 0%, transparent 40%);
}

.lidm-page-header .page-header-content {
    position: relative;
    z-index: 1;
}

.lidm-page-title {
    font-family: 'Maven Pro', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.lidm-page-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.05rem;
    font-weight: 300;
    margin-bottom: 0;
}

.lidm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.lidm-breadcrumb li {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

.lidm-breadcrumb li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s;
}

.lidm-breadcrumb li a:hover {
    color: var(--upi-gold);
}

.lidm-breadcrumb li + li::before {
    content: '/';
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.3);
}

/* ===== CARDS ===== */
.lidm-card {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 51, 102, 0.06);
    transition: var(--transition);
    overflow: hidden;
}

.lidm-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.lidm-card-body {
    padding: 28px;
}

.lidm-card-flat {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 51, 102, 0.06);
    overflow: hidden;
}

/* ===== BUTTONS ===== */
.btn-lidm-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--upi-gold), var(--upi-gold-light));
    color: var(--upi-navy-dark);
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-lidm-primary:hover {
    transform: translateY(-2px);
    color: var(--upi-navy-dark);
    text-decoration: none;
}

.btn-lidm-navy {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: var(--upi-navy);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-lidm-navy:hover {
    background: var(--upi-navy-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 51, 102, 0.3);
    text-decoration: none;
}

.btn-lidm-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: transparent;
    color: var(--upi-navy);
    font-weight: 600;
    font-size: 0.88rem;
    border: 1.5px solid rgba(0, 51, 102, 0.2);
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-lidm-outline:hover {
    background: rgba(0, 51, 102, 0.04);
    border-color: var(--upi-navy);
    color: var(--upi-navy);
    text-decoration: none;
}

.btn-lidm-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: transparent;
    color: var(--status-rejected);
    font-weight: 600;
    font-size: 0.88rem;
    border: 1.5px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-lidm-danger:hover {
    background: var(--status-rejected-bg);
    border-color: var(--status-rejected);
    color: var(--status-rejected);
    text-decoration: none;
}

.btn-lidm-success {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--status-approved);
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-lidm-success:hover {
    background: #16a34a;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
    text-decoration: none;
}

/* ===== STATUS BADGES ===== */
.lidm-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 50px;
    letter-spacing: 0.3px;
}

.lidm-badge-draft {
    background: var(--status-draft-bg);
    color: var(--status-draft);
}

.lidm-badge-review {
    background: var(--status-review-bg);
    color: var(--status-review);
}

.lidm-badge-approved {
    background: var(--status-approved-bg);
    color: var(--status-approved);
}

.lidm-badge-rejected {
    background: var(--status-rejected-bg);
    color: var(--status-rejected);
}

.lidm-badge-info {
    background: var(--status-info-bg);
    color: var(--status-info);
}

.lidm-badge-light {
    background: rgba(0, 51, 102, 0.06);
    color: var(--upi-navy);
}

.lidm-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ===== ALERTS ===== */
.lidm-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid;
}

.lidm-alert-success {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.2);
    color: #15803d;
}

.lidm-alert-error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.lidm-alert-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.lidm-alert-success .lidm-alert-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.lidm-alert-error .lidm-alert-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.lidm-alert-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.lidm-alert-text {
    font-size: 0.88rem;
    opacity: 0.85;
    margin: 0;
}

.lidm-alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
    color: inherit;
}

.lidm-alert-close:hover {
    opacity: 1;
}

/* ===== EMPTY STATE ===== */
.lidm-empty-state {
    text-align: center;
    padding: 64px 24px;
}

.lidm-empty-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--bg-section);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
}

.lidm-empty-title {
    font-family: 'Maven Pro', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.lidm-empty-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 24px;
}

/* ===== MODALS ===== */
.lidm-modal .modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.lidm-modal .modal-header {
    background: var(--bg-light);
    border-bottom: 1px solid rgba(0, 51, 102, 0.06);
    padding: 20px 28px;
}

.lidm-modal .modal-title {
    font-family: 'Maven Pro', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
}

.lidm-modal .modal-body {
    padding: 32px 28px;
}

.lidm-modal .modal-footer {
    border-top: 1px solid rgba(0, 51, 102, 0.06);
    padding: 16px 28px;
}

/* ===== FORM UTILITIES ===== */
.lidm-form-section-title {
    font-family: 'Maven Pro', sans-serif;
    font-weight: 700;
    color: var(--upi-navy);
    border-bottom: 2px solid rgba(0, 51, 102, 0.1);
    padding-bottom: 10px;
    margin-bottom: 1.5rem;
    margin-top: 2.5rem;
}

.lidm-form-section-title:first-child {
    margin-top: 0;
}

.lidm-modal-icon-container {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
}

.lidm-modal-icon-container.info { background: var(--status-info-bg); color: var(--status-info); }
.lidm-modal-icon-container.success { background: var(--status-approved-bg); color: var(--status-approved); }
.lidm-modal-icon-container.danger { background: var(--status-rejected-bg); color: var(--status-rejected); }

/* ===== PROPOSAL CARDS (INDEX) ===== */
.proposal-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.proposal-card {
    border-left: 4px solid transparent;
}

.proposal-card:hover {
    border-left-color: var(--upi-gold);
}

.proposal-card-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.08), rgba(0, 51, 102, 0.04));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--upi-navy);
}

.proposal-card-title {
    font-family: 'Maven Pro', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.proposal-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.proposal-meta-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.proposal-meta-item i {
    font-size: 0.95rem;
    color: var(--upi-navy);
    opacity: 0.5;
}

.btn-sm-action {
    padding: 8px 16px !important;
    font-size: 0.82rem !important;
    white-space: nowrap;
}

/* ===== TIMELINE (SHOW) ===== */
.lidm-timeline {
    position: relative;
    padding-left: 0;
    list-style: none;
}

.lidm-timeline-item {
    position: relative;
    padding-bottom: 30px;
    padding-left: 60px;
}

.lidm-timeline-item:last-child {
    padding-bottom: 0;
}

.lidm-timeline-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 20px;
    top: 40px;
    bottom: 0;
    width: 1px;
    background: rgba(0, 51, 102, 0.1);
}

.lidm-timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    z-index: 2;
    box-shadow: 0 0 0 4px #fff;
}

.lidm-timeline-content {
    background: #fff;
}

.lidm-timeline-date {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: block;
}

.lidm-timeline-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

/* Helper Utilities */
.min-vh-60 { min-height: 60vh; }
.mt-n5 { margin-top: -3rem !important; }
.z-index-10 { z-index: 10 !important; }
.lidm-member-avatar {
    width: 32px;
    height:32px;
    border-radius: 8px;
    background: var(--upi-navy);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .lidm-section { padding: 60px 0; }
    .lidm-page-header { padding: 100px 0 40px; }
    .section-header { margin-bottom: 36px; }
    
    /* Mobile proposal cards */
    .proposal-card-actions {
        border-top: 1px solid rgba(0, 51, 102, 0.06);
        padding-top: 16px;
        margin-top: 8px;
        width: 100%;
        flex-wrap: wrap;
    }

    .btn-sm-action {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
}
