/* Reset dan base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Login page */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo img {
    max-width: 80px;
    margin-bottom: 10px;
}

.logo h2 {
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.btn-primary {
    background-color: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #5a6fd5;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.login-links {
    text-align: center;
    margin-top: 15px;
}

.login-links a {
    color: #667eea;
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

.alert {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dashboard */
.dashboard {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin-right: 15px;
}

.user-menu {
    position: relative;
    cursor: pointer;
}

.user-menu .dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    min-width: 150px;
    z-index: 1000;
}

.user-menu:hover .dropdown {
    display: block;
}

.dropdown a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
}

.dropdown a:hover {
    background-color: #f5f5f5;
}

/* Perbaikan untuk sidebar dan main-content */
.dashboard-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    transition: all 0.3s ease;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar.collapsed {
    width: 60px;
}

/* Perbaikan untuk konten utama */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    transition: all 0.3s ease;
    box-sizing: border-box;
}



.sidebar-menu ul {
    list-style: none;
    padding: 0;
    width: 250px;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
    width: 250px;
}

.sidebar-menu a:hover {
    background-color: #34495e;
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-menu span {
    display: none;
}

.sidebar.collapsed .sidebar-menu i {
    margin-right: 0;
}


.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    transition: margin-left 0.3s;
}

.main-content.expanded {
    margin-left: -190px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    transition: width 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Content styles */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
      max-width: 100%;
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
}

.error {
    color: #dc3545;
    padding: 20px;
    text-align: center;
      width: 100%;
    box-sizing: border-box;
}

/* Perbaikan untuk content-area */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    transition: margin-left 0.3s;
    max-width: 100%;
    box-sizing: border-box;
}

.main-content.expanded {
    margin-left: -190px;
    width: calc(100% + 190px);
}
.table-container {
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        height: calc(100% - 60px);
        z-index: 1000;
        left: 0;
        top: 60px;
    }
    
    .sidebar:not(.collapsed) {
        width: 250px;
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        width: 60px;
        transform: translateX(-190px);
    }
    
    .main-content {
        width: 100%;
    }
}


