:root {
    --primary: #3a7bd5;
    /* Professional Blue */
    --secondary: #e2e8f0;
    /* Neutral Gray */
    --accent: #4834d4;
    /* Deep Purple */
    --dark: #1a1a2e;
    --light: #f3f6fd;
    /* Very light blue-gray */
    --text-main: #2b2d42;
    --white: #ffffff;
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Quicksand', sans-serif;
    --danger-color: #ef476f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--light);
    color: var(--text-main);
    line-height: 1.6;
}

/* Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600&family=Quicksand:wght@400;600&display=swap');

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    color: var(--dark);
    margin-bottom: 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Utility Classes */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.text-right {
    text-align: right;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Admin/Dashboard Layout */
.admin-wrapper {
    display: flex;
    min-height: calc(100vh - 80px);
    /* Adjust based on navbar height */
}

.sidebar {
    width: 260px;
    background: #11101d;
    color: #fff;
    flex-shrink: 0;
    transition: all 0.5s ease;
    z-index: 100;
}

.sidebar-header {
    padding: 20px 25px;
    background: #11101d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--font-heading);
    font-weight: bold;
}

.sidebar-menu {
    padding: 20px 0;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

/* Scrollbar for sidebar */
.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
}

/* Menu Groups */
.menu-group {
    margin-bottom: 20px;
}

.menu-title {
    font-size: 0.7rem;
    color: #5c5c6d;
    padding: 0 25px;
    margin-bottom: 5px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Links */
.sidebar-menu a,
.submenu-header {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #aeb7c2;
    transition: all 0.3s;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.submenu-header:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-menu a.active {
    color: #fff;
    background: rgba(76, 201, 240, 0.1);
    border-left: 3px solid var(--primary);
}

.sidebar-menu a i,
.submenu-header i:not(.arrow) {
    width: 25px;
    font-size: 1.1rem;
    text-align: center;
    margin-right: 10px;
}

/* Submenus */
.submenu-item {
    position: relative;
}

.submenu-header {
    justify-content: space-between;
}

.submenu-header .arrow {
    font-size: 0.8rem;
    transition: transform 0.3s;
    margin-right: 0 !important;
    width: auto !important;
}

/* Modern Styles Refinement */

.submenu-content a i {
    opacity: 0.7;
    margin-right: 12px;
}

.main-content {
    background-color: #f3f4f8;
    /* Softer gray */
}

/* Card Redesign */
.card {
    border: none !important;
    background: #ffffff;
    border-radius: 12px !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03) !important;
    padding: 30px;
    transition: transform 0.2s;
}

.stat-card {
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* Table Redesign */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #8898aa;
    font-weight: 700;
    padding: 20px !important;
    border-bottom: 2px solid #f0f2f5 !important;
    background: #ffffff;
}

td {
    padding: 20px !important;
    vertical-align: middle;
    border-bottom: 1px solid #f6f9fc !important;
    color: #525f7f;
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none !important;
}

tr:hover td {
    background-color: #fcfcfd;
}

/* Badge Updates */
.badge {
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
}

.submenu-content {
    display: none;
    overflow: hidden;
    /* Smooth transition support */
}

.submenu-content a {
    padding-left: 55px;
    font-size: 0.9rem;
}

/* Open State */
.submenu-item.open .submenu-content {
    display: block;
    animation: fadeIn 0.3s;
}

.submenu-item.open .arrow {
    transform: rotate(90deg);
}

.submenu-item.open .submenu-header {
    color: #fff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    flex-grow: 1;
    padding: 30px;
    margin-top: 60px;
    /* Offset for Fixed Header */
    background-color: #f0f2f5;
    overflow-y: auto;
}

.stat-card-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: #888;
    margin: 0;
}

.stat-info p {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark);
    margin: 0;
}

/* Button Sizes */
.btn-sm {
    padding: 8px 15px;
    font-size: 0.9rem;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.1);
}

/* Modal System */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Modern Button Redesign */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    /* Slightly smoother rounded corners */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    box-shadow: none !important;
    /* Remove 3D effect */
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    border: 1px solid transparent;
}

.btn-primary:hover {
    background-color: #3bb1d6;
    /* Slightly darker */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 201, 240, 0.3) !important;
}

.btn-secondary {
    background-color: #fff;
    color: #525f7f;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #d63d60;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 71, 111, 0.3) !important;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

/* Action Icons in Tables */
.text-danger {
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.text-danger:hover {
    background: rgba(239, 71, 111, 0.1);
}

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 20px;
}

.section-padding {
    padding: 60px 0;
}

/* Header */
.navbar {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-main);
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #e0f7fa 0%, #fff 100%);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--accent);
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Features/VisiMisi */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    border-bottom: 5px solid var(--primary);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: #eef2ff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--primary);
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.social-links a {
    margin-left: 15px;
    font-size: 1.2rem;
    color: var(--white);
}

/* Form Styles */
.form-container {
    max-width: 400px;
    margin: 50px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

/* Button Sizes */
.btn-sm {
    padding: 8px 15px;
    font-size: 0.9rem;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.1);
}

/* Modal System */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}