/**
 * MyKC (MyKertasCadangan) Module Theme
 * Blue theme for Program Proposal System
 */

:root {
    --mykc-primary: #0d6efd;
    --mykc-primary-dark: #0b5ed7;
    --mykc-secondary: #00b4d8;
    --mykc-accent: #48cae4;
    --mykc-light: #caf0f8;
    --mykc-dark: #03045e;
    --mykc-gray: #6c757d;
    --mykc-gradient-primary: linear-gradient(135deg, #0d6efd 0%, #00b4d8 100%);
    --mykc-gradient-dark: linear-gradient(135deg, #03045e 0%, #0077b6 100%);
    --mykc-sidebar-width: 280px;
}

/* Base */
html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: #f8f9fa;
}

/* App layout */
.mykc-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/* Navbar */
.mykc-navbar {
    background: var(--mykc-gradient-dark);
    box-shadow: 0 2px 10px rgba(3, 4, 94, 0.2);
}

.mykc-navbar .navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Sidebar */
.mykc-sidebar {
    background: linear-gradient(180deg, #03045e 0%, #023e8a 50%, #0077b6 100%);
    flex: 0 0 var(--mykc-sidebar-width);
    width: var(--mykc-sidebar-width);
    min-height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mykc-sidebar .sidebar-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.mykc-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 0.15rem 0.5rem;
    transition: all 0.3s ease;
}

.mykc-sidebar .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.mykc-sidebar .nav-link.active {
    color: #ffffff;
    background: var(--mykc-gradient-primary);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.mykc-sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

.mykc-sidebar .sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
}

/* Main content area */
.mykc-main {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Cards */
.mykc-card {
    background: #ffffff;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(3, 4, 94, 0.08);
    transition: all 0.3s ease;
}

.mykc-card:hover {
    box-shadow: 0 8px 30px rgba(3, 4, 94, 0.12);
    transform: translateY(-2px);
}

.mykc-card .card-header {
    background: var(--mykc-gradient-primary);
    border-radius: 1rem 1rem 0 0 !important;
    color: white;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border: none;
}

/* Statistics cards */
.stat-card {
    background: #ffffff;
    border: none;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(3, 4, 94, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--mykc-gradient-primary);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(3, 4, 94, 0.15);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card .stat-icon.bg-primary {
    background: var(--mykc-gradient-primary) !important;
}

.stat-card .stat-icon.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
}

.stat-card .stat-icon.bg-success {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%) !important;
}

.stat-card .stat-icon.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e91e63 100%) !important;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--mykc-dark);
}

.stat-card .stat-label {
    color: var(--mykc-gray);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Buttons */
.btn-mykc-primary {
    background: var(--mykc-gradient-primary);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-mykc-primary:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #0096c7 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    color: white;
}

.btn-mykc-outline {
    background: transparent;
    border: 2px solid var(--mykc-primary);
    color: var(--mykc-primary);
    padding: 0.7rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-mykc-outline:hover {
    background: var(--mykc-primary);
    color: white;
    transform: translateY(-2px);
}

/* Tables */
.mykc-table {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(3, 4, 94, 0.08);
}

.mykc-table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.mykc-table thead th {
    border: none;
    color: var(--mykc-dark);
    font-weight: 600;
    padding: 1rem;
    font-size: 0.9rem;
}

.mykc-table tbody td {
    border-color: #f1f3f5;
    padding: 1rem;
    vertical-align: middle;
}

.mykc-table tbody tr:hover {
    background: rgba(13, 110, 253, 0.03);
}

/* Status badges */
.badge-draft {
    background: #6c757d;
    color: white;
}

.badge-submitted {
    background: #17a2b8;
    color: white;
}

.badge-ketua-review,
.badge-pek-review,
.badge-kukp-review {
    background: #ffc107;
    color: #000;
}

.badge-ketua-approved,
.badge-pek-approved,
.badge-kukp-approved {
    background: #0d6efd;
    color: white;
}

.badge-ketua-rejected,
.badge-pek-rejected,
.badge-kukp-rejected,
.badge-tidak-lulus {
    background: #dc3545;
    color: white;
}

.badge-kiv {
    background: #fd7e14;
    color: white;
}

.badge-pending-director {
    background: #6f42c1;
    color: white;
}

.badge-lulus {
    background: #198754;
    color: white;
}

/* Fix Bootstrap badge text color for light backgrounds */
.badge.bg-warning,
.badge.bg-light {
    color: #212529 !important;
}

.badge.bg-info {
    color: #fff !important;
}

.badge.bg-secondary,
.badge.bg-primary,
.badge.bg-success,
.badge.bg-danger {
    color: #fff !important;
}

/* Welcome hero section */
.welcome-hero {
    background: var(--mykc-gradient-primary);
    border-radius: 1.25rem;
    padding: 2rem;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.welcome-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(30deg);
    pointer-events: none;
}

.welcome-hero h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-hero p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* Quick actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.quick-actions .btn {
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
}

/* Footer */
.mykc-footer {
    color: var(--mykc-gray);
    font-size: 0.875rem;
    padding: 2rem 0;
    text-align: center;
    margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .mykc-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1000;
        width: 100%;
        max-width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .mykc-sidebar.show {
        transform: translateX(0);
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .welcome-hero {
        padding: 1.5rem;
    }
}

/* Login page specific styles */
.mykc-login-bg {
    background: var(--mykc-gradient-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.mykc-login-card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(3, 4, 94, 0.3);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
}

.mykc-login-header {
    background: var(--mykc-gradient-primary);
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
}

.mykc-login-header i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.mykc-login-header h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.mykc-login-header p {
    opacity: 0.9;
    margin: 0;
}

.mykc-login-body {
    padding: 2rem;
}

.mykc-login-body .form-control {
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.mykc-login-body .form-control:focus {
    border-color: var(--mykc-primary);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

.mykc-login-body .input-group-text {
    background: transparent;
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 0.75rem 0 0 0.75rem;
}

.mykc-login-body .input-group .form-control {
    border-left: none;
    border-radius: 0 0.75rem 0.75rem 0;
}

.mykc-login-body .input-group:focus-within .input-group-text {
    border-color: var(--mykc-primary);
}

/* Enhanced Dashboard Styles */

/* Hero Section */
.hero-section {
    background: var(--mykc-gradient-primary);
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: 0 10px 40px rgba(13, 110, 253, 0.3);
}

.hero-content {
    padding: 2.5rem;
    position: relative;
    z-index: 2;
}

.hero-pattern {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 0;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-stat-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.btn-hero-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-hero-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Enhanced Statistics Cards */
.stat-card-enhanced {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(3, 4, 94, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.stat-card-enhanced:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(3, 4, 94, 0.15);
}

.stat-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card-enhanced.stat-primary::before {
    background: var(--mykc-gradient-primary);
}

.stat-card-enhanced.stat-warning::before {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.stat-card-enhanced.stat-success::before {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
}

.stat-card-enhanced.stat-danger::before {
    background: linear-gradient(135deg, #dc3545 0%, #e91e63 100%);
}

.stat-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
}

.stat-card-enhanced.stat-primary .stat-card-icon {
    background: var(--mykc-gradient-primary);
}

.stat-card-enhanced.stat-warning .stat-card-icon {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.stat-card-enhanced.stat-success .stat-card-icon {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
}

.stat-card-enhanced.stat-danger .stat-card-icon {
    background: linear-gradient(135deg, #dc3545 0%, #e91e63 100%);
}

.stat-number-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mykc-dark);
    margin: 0;
    line-height: 1;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.stat-card-enhanced.stat-primary .stat-trend {
    color: var(--mykc-primary);
}

.stat-card-enhanced.stat-warning .stat-trend {
    color: #fd7e14;
}

.stat-card-enhanced.stat-success .stat-trend {
    color: #20c997;
}

.stat-card-enhanced.stat-danger .stat-trend {
    color: #e91e63;
}

.stat-label {
    color: var(--mykc-gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.stat-progress {
    margin-top: auto;
}

/* Info Cards */
.info-card {
    background: white;
    border: none;
    border-radius: 1.25rem;
    box-shadow: 0 4px 20px rgba(3, 4, 94, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.info-card:hover {
    box-shadow: 0 8px 30px rgba(3, 4, 94, 0.12);
    transform: translateY(-2px);
}

.info-card-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #f1f3f5;
}

.info-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--mykc-dark);
    margin: 0;
    display: flex;
    align-items: center;
}

.info-card-body {
    padding: 1.5rem;
}

/* Quick Link Cards */
.quick-link-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-link-card:hover {
    background: white;
    border-color: var(--mykc-primary);
    color: var(--mykc-primary);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.1);
}

.quick-link-icon {
    width: 50px;
    height: 50px;
    background: var(--mykc-gradient-primary);
    color: white;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.quick-link-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--mykc-dark);
}

.quick-link-desc {
    color: var(--mykc-gray);
    font-size: 0.85rem;
}

.quick-link-card:hover .quick-link-title {
    color: var(--mykc-primary);
}

/* System Info List */
.system-info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.system-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
}

.system-info-item i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

.system-info-item > div {
    flex: 1;
}

.system-info-item > div small {
    display: block;
    margin-bottom: 0.25rem;
}

/* Alert Cards */
.alert-card {
    border-radius: 1.25rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.alert-card.alert-warning {
    background: linear-gradient(135deg, #fff9e6 0%, #fff4d4 100%);
    border: 2px solid #ffc107;
    color: #856404;
}

.alert-icon {
    font-size: 2.5rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.alert-message {
    margin-bottom: 1rem;
    opacity: 0.9;
}

/* Template Cards */
.template-card {
    background: white;
    border: none;
    border-radius: 1.25rem;
    box-shadow: 0 4px 20px rgba(3, 4, 94, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(3, 4, 94, 0.15);
}

.template-card-icon {
    background: var(--mykc-gradient-primary);
    color: white;
    font-size: 3rem;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.template-card-body {
    padding: 0 1.5rem 1.5rem;
    flex: 1;
}

.template-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mykc-dark);
    margin-bottom: 0.5rem;
}

.template-card-description {
    color: var(--mykc-gray);
    margin-bottom: 1rem;
}

.template-card-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.template-card-footer {
    padding: 1.5rem;
    border-top: 1px solid #f1f3f5;
    background: #f8f9fa;
}

/* Section Spacing */
/* Add extra margin between major dashboard sections */
.dashboard-section {
    margin-bottom: 3rem;
}

/* Specific spacing for major sections */
.recent-proposals-section {
    margin-bottom: 3rem;
}

.quick-links-section {
    margin-bottom: 2rem;
}

.system-info-section {
    margin-bottom: 2rem;
}

/* Add padding above info cards section */
.info-cards-container {
    padding-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .hero-stats {
        gap: 0.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .hero-quick-actions {
        margin-top: 1rem;
        text-align: center !important;
    }

    .dashboard-section {
        margin-bottom: 2rem;
    }

    .recent-proposals-section {
        margin-bottom: 2rem;
    }
}