@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/11.1.0/sweetalert2.min.css');
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css");

/* --- CSS Variables --- */
:root {
    --primary: #4361ee;         /* Main accent color */
    --primary-dark: #3a56d4;    /* Darker shade for hover states */
    --secondary: #3f37c9;       /* Secondary accent */
    --accent: #4895ef;          /* Lighter blue for highlights */
    --dark: #1a1a2e;            /* Main dark background color */
    --light: #f8f9fa;           /* Light text/element color */
    --card-bg: rgba(255, 255, 255, 0.08); /* Transparent background for cards */
    --text-primary: #ffffff;    /* Primary text color */
    --text-secondary: #e2e2e2;  /* Secondary text color */
    --border-alpha: rgba(255, 255, 255, 0.1); /* Transparent border color */
    --shadow-light: rgba(0, 0, 0, 0.2); /* Light shadow for depth */
    --shadow-dark: rgba(0, 0, 0, 0.3);  /* Darker shadow for hover */
    --blur-effect: blur(10px);  /* Standard blur for frosted glass effect */
}

/* --- Base Body Styles --- */
body {
    font-family: 'Poppins', sans-serif;
    /* Optimized gradient, no need for background-size/position for gradients */
    background: linear-gradient(135deg, var(--dark), #302b63, #24243e);
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-attachment: fixed; /* Ensures background stays fixed during scroll */
}

/* --- Layout Container --- */
.container {
    max-width: 1200px;
    padding: 2rem;
    margin: 0 auto;
}

/* --- Card Styles --- */
.card {
    background: var(--card-bg);
    backdrop-filter: var(--blur-effect);
    border: 1px solid var(--border-alpha);
    border-radius: 12px;
    box-shadow: 0 8px 32px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Combined transitions */
    overflow: hidden; /* Ensures content respects border-radius */
    color: var(--text-primary); /* Inherits from body but explicitly set */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px var(--shadow-dark);
}

.card-header {
    background: rgba(67, 97, 238, 0.2); /* Using explicit rgba for specific transparency */
    border-bottom: 1px solid var(--border-alpha);
    padding: 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* --- Button Styles --- */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    transition: all 0.3s ease; /* General transition for all buttons */
    border: none;
    cursor: pointer; /* Indicate clickable element */
}

.btn-primary {
    background-color: var(--primary);
    color: white; /* Explicitly white for primary buttons */
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3); /* Specific shadow for primary */
}

.btn-outline-primary {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

/* --- Navbar Styles --- */
.navbar {
    background: rgba(26, 26, 46, 0.8) !important; /* Specific alpha for navbar */
    backdrop-filter: var(--blur-effect);
    box-shadow: 0 2px 15px var(--shadow-light);
    padding: 0.8rem 1rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary); /* Ensure brand color is consistent */
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: var(--text-secondary); /* Default nav link color */
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent); /* Highlight on hover/active */
}


/* --- Table Styles --- */
.table {
    color: var(--text-primary);
    background: var(--card-bg);
    backdrop-filter: blur(5px); /* Slightly less blur than full cards */
    border-radius: 10px;
    overflow: hidden; /* Important for border-radius to apply */
    width: 100%; /* Ensure table takes full width of its parent */
    border-collapse: collapse; /* For clean borders */
}

.table th {
    background: rgba(67, 97, 238, 0.3);
    font-weight: 600;
    border-bottom: 1px solid var(--border-alpha);
    padding: 0.75rem; /* Standard table padding */
    text-align: left; /* Default text alignment for headers */
}

.table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Lighter border for rows */
    padding: 0.75rem; /* Standard table padding */
}

/* Specific styling for table-striped */
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.03); /* Very subtle stripe */
}

/* --- Form Elements --- */
.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
    width: 100%; /* Ensures inputs take full available width */
}

.form-control::placeholder { /* Placeholder text color */
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    box-shadow: 0 0 0 0.25rem rgba(72, 149, 239, 0.25);
    color: white; /* Ensure text remains white on focus */
    outline: none; /* Remove default browser outline */
}

.input-group-text {
    background: rgba(67, 97, 238, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px 0 0 8px; /* Rounded only on the left */
}

/* Adjusting input-group styling for consistency */
.input-group .form-control {
    border-radius: 0 8px 8px 0; /* Rounded only on the right when part of input-group */
    border-left: none; /* Remove duplicate border */
}


/* --- Dashboard Counter Elements --- */
.dash-count {
    background: var(--card-bg);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-alpha);
    display: flex; /* Using flex for internal alignment */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px; /* Ensure consistent height */
}

.dash-count:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-light); /* Adjusted shadow for hover */
}

.dash-count h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--accent);
    line-height: 1.2; /* Better line height for large text */
}

.dash-count p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 1rem;
}

/* --- Utility Classes & Animations --- */
.key-sensi {
    filter: blur(5px);
}

.text-success { /* Assuming this is for status messages */
    color: #28a745 !important; /* Standard green for success */
}

/* General utility classes if needed */
.text-dark { /* This was used for dark text on dark background in previous versions, now it's mostly light */
    color: var(--text-primary) !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate {
    animation: fadeIn 0.6s ease forwards;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .card {
        border-radius: 10px;
    }

    .dash-count {
        padding: 1rem;
        min-height: 100px; /* Adjust for smaller screens */
    }

    .dash-count h3 {
        font-size: 2rem;
    }

    .btn {
        padding: 0.5rem 1rem; /* Smaller padding for buttons on mobile */
        font-size: 0.9rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .nav-link {
        padding: 0.4rem 0.8rem !important;
    }
}

/* --- SweetAlert2 Overrides (if necessary, though usually works well) --- */
/* If SweetAlert2 doesn't look right, you might need specific overrides here
   Example (uncomment if needed):
.swal2-popup {
    background: var(--dark) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--primary) !important;
}
.swal2-title {
    color: var(--text-primary) !important;
}
.swal2-content {
    color: var(--text-secondary) !important;
}
.swal2-confirm, .swal2-cancel {
    font-family: 'Poppins', sans-serif !important;
}
*/