:root {
    --primary: #FFB800;
    --primary-dark: #E6A600;
    --secondary: #FFF1CC;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    --background: #F8F9FA;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 8px;
    --gradient: linear-gradient(135deg, var(--primary) 0%, #FFD700 100%);
    --card-shadow: 0 8px 30px rgba(0,0,0,0.12);
    --input-shadow: 0 2px 4px rgba(0,0,0,0.06);
    --hover-shadow: 0 10px 40px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --card-gradient: linear-gradient(145deg, #ffffff, #f5f5f5);
    --card-hover-gradient: linear-gradient(145deg, #f5f5f5, #ffffff);
    --icon-gradient: linear-gradient(45deg, var(--primary) 0%, #FFD700 100%);
    --icon-size: clamp(2.5rem, 5vw, 3.5rem);
    --card-padding: clamp(1.5rem, 3vw, 2.5rem);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: var(--gradient);
    padding: 1.5rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content h1 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    color: var(--text-dark);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: clamp(35px, 8vw, 50px);
    width: auto;
}

.card {
    background: var(--card-gradient);
    border-radius: 20px;
    padding: var(--card-padding);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    background: var(--card-hover-gradient);
    transform: translateY(-5px) scale(1.02);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2));
    pointer-events: none;
}

.card-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    background: var(--icon-gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(255, 184, 0, 0.2);
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-icon svg {
    width: 60%;
    height: 60%;
    color: var(--white);
}

.card-content {
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.card-description {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: var(--text-light);
    line-height: 1.6;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: var(--gradient);
    box-shadow: 0 4px 15px rgba(255,184,0,0.3);
    color: var(--text-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,184,0,0.4);
}

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

.btn-outline:hover {
    background: var(--secondary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.input-group {
    position: relative;
    display: flex;
    gap: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--input-shadow);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 184, 0, 0.2);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255,184,0,0.1);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.15);
}

.table-container {
    overflow-x: auto;
    margin: 1rem 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: var(--primary);
    color: var(--text-dark);
    font-weight: 600;
}

.table tr:hover {
    background: var(--secondary);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--primary);
}

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

    .header {
        padding: 1rem 0;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    /* Make button row responsive */
    div[style*="display: flex; gap: 1rem;"] {
        flex-direction: column;
        gap: 0.5rem !important;
    }

    .btn:not(.btn-icon) {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    /* Adjust input groups for mobile */
    .input-group {
        flex-direction: column;
    }

    .input-group .form-control {
        width: 100%;
        border-radius: var(--radius);
    }

    .input-group .btn {
        border-radius: var(--radius);
    }

    .table th,
    .table td {
        padding: 0.75rem;
    }

    .card {
        margin: 0.5rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        padding: 0.5rem;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        transition: left 0.3s ease;
    }
    
    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .main-content {
        padding: 1rem;
    }
    
    .footer {
        padding: 1rem;
    }

    /* Override untuk btn-icon */
    .btn.btn-icon {
        width: auto;
        min-width: unset;
        padding: 0.5rem;
    }

    /* Pastikan btn-icon tidak terpengaruh margin */
    .btn-icon.btn-block {
        width: auto;
        margin: 0;
    }
}

/* Mobile-first approach */
@media (min-width: 576px) {
    .grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 992px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Loading state */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form validation visual feedback */
.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,...");
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,...");
}

/* Grid improvements */
.grid {
    display: grid;
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1rem, 3vw, 2rem);
}

@media (min-width: 640px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Auth styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    padding: 1rem;
}

.auth-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--card-shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 80px;
    height: auto;
    margin-bottom: 1rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.password-input {
    position: relative;
}

.btn-toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-danger {
    background: #fff5f5;
    color: #dc3545;
    border: 1px solid #dc3545;
}

/* Dashboard styles */
.dashboard-container {
    position: relative;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: 280px;
    transition: margin 0.3s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1.5rem;
}

.sidebar-logo {
    width: 40px;
    height: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    background: var(--secondary);
    color: var(--primary-dark);
}

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

.nav-item.active {
    background: var(--primary);
    color: var(--white);
}

.nav-item.active svg {
    color: var(--white);
}

.main-content {
    flex: 1;
    padding: 2rem;
    background: var(--background);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-title h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.user-info {
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.info-card {
    padding: 1.5rem;
}

.info-card .card-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.text-danger {
    color: #dc3545;
}

/* Responsive dashboard */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        left: -280px;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        padding: 1rem;
    }

    .content-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Navbar styles */
.navbar {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-left: 0;
    transition: all 0.3s ease;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-dark);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.user-dropdown {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: var(--text-dark);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    min-width: 200px;
    padding: 0.5rem;
    display: none;
}

.user-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: var(--radius);
}

.dropdown-item:hover {
    background: var(--secondary);
}

/* Footer styles */
.footer {
    margin-top: auto;
    background: var(--white);
    padding: 1.5rem 2rem;
    border-top: 1px solid #eee;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        left: -280px;
    }

    .sidebar.active {
        left: 0;
    }

    .content-wrapper {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    /* Add overlay when sidebar is active */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Adjust navbar padding for toggle button */
    .navbar {
        padding-left: 4rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-links {
        justify-content: center;
    }
}

/* Add to existing styles */
.nav-divider {
    height: 1px;
    background: #eee;
    margin: 1rem 0;
}

/* Toggle button styles */
.sidebar-toggle {
    display: none;
    position: fixed;
    left: 1rem;
    top: 1rem;
    z-index: 1001;
    background: var(--white);
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: var(--card-shadow);
}

.sidebar-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-dark);
}

.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Add to auth styles */
.auth-footer {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.auth-footer p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

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

/* Add to existing styles */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; /* Fixed width */
    height: 40px; /* Fixed height */
    padding: 0.5rem;
    border-radius: 8px;
    min-width: unset;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Override btn-block for icon buttons */
.btn-icon.btn-block {
    width: auto;
    margin-top: 0;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .content-wrapper {
        margin-left: 0;
    }
}

@media (min-width: 769px) {
    .sidebar {
        position: fixed;
        left: 0;
        transition: width 0.3s ease;
    }

    .content-wrapper {
        margin-left: 280px;
        transition: margin-left 0.3s ease;
    }

    .dashboard-container.sidebar-collapsed .sidebar {
        width: 60px;
    }

    .dashboard-container.sidebar-collapsed .content-wrapper {
        margin-left: 60px;
    }
}

/* Prevent scroll when sidebar is open on mobile */
.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Base sidebar styles */
.sidebar {
    width: 280px;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Navbar styles */
.navbar {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    width: 100%;
    top: 0;
    z-index: 100;
    margin-left: 0;
    transition: all 0.3s ease;
}

/* Content wrapper */
.content-wrapper {
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

/* Main content */
.main-content {
    flex: 1;
    padding: 2rem;
    background: var(--background);
}

/* Toggle button */
.sidebar-toggle {
    display: none;
    position: fixed;
    left: 1rem;
    top: 1rem;
    z-index: 1001;
    background: var(--white);
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: var(--card-shadow);
}

/* Responsive styles */
@media (max-width: 768px) {
    .sidebar {
        left: -280px;
    }

    .sidebar.active {
        left: 0;
    }

    .content-wrapper {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .navbar {
        padding-left: 4rem;
    }
}

/* Desktop collapsed state */
@media (min-width: 769px) {
    .dashboard-container.sidebar-collapsed .sidebar {
        width: 60px;
    }

    .dashboard-container.sidebar-collapsed .content-wrapper {
        margin-left: 60px;
    }

    .dashboard-container.sidebar-collapsed .sidebar-header h2,
    .dashboard-container.sidebar-collapsed .nav-text {
        display: none;
    }

    .dashboard-container.sidebar-collapsed .nav-item {
        padding: 0.75rem;
        justify-content: center;
    }

    .dashboard-container.sidebar-collapsed .nav-icon {
        margin: 0;
    }
}

/* Overlay styles */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Prevent scroll when sidebar is open on mobile */
.no-scroll {
    overflow: hidden;
}

/* Dashboard Components */
.dashboard-header {
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stats-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-icon svg {
    color: var(--white);
}

.stats-info h3 {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stats-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.content-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.content-card h2 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

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

    .dashboard-header {
        text-align: center;
    }

    .table-responsive {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
}

/* Table improvements */
.table {
    min-width: 600px;
    margin-bottom: 0;
}

.table th {
    white-space: nowrap;
    background: var(--background);
}

.table td {
    vertical-align: middle;
}

/* Badge styles */
.badge {
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 50rem;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-light);
} 