/* Root Variables */
:root {
    --primary-color: #6c63ff;
    --secondary-color: #00b4db;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1 { font-size: 2.5rem; margin-bottom: 10px; }
h2 { font-size: 2rem; margin-bottom: 15px; }
h3 { font-size: 1.5rem; margin-bottom: 10px; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 10px; }
a { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

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

/* Navbar */
.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.navbar-menu {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Login Page */
.login-body {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    margin: 0 auto;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 10px;
}

.login-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.login-info {
    background-color: var(--light-color);
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    font-size: 13px;
}

.login-info p {
    margin: 5px 0;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(108, 99, 255, 0.3);
}

input:disabled,
input[disabled] {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Photo Dropzone */
.photo-dropzone {
    border: 3px dashed var(--primary-color);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.photo-dropzone:hover {
    background-color: #f0f0f0;
    border-color: #5551cc;
    transform: scale(1.01);
}

.photo-dropzone.dragover {
    border-color: #00b4db;
    background-color: #e8f7fb;
    box-shadow: 0 0 15px rgba(0, 180, 219, 0.3);
}

.photo-dropzone.success {
    border-color: var(--success-color);
    background-color: #e8f5e9;
}

.dropzone-content {
    pointer-events: none;
}

.dropzone-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.photo-dropzone h4 {
    margin: 10px 0;
    color: var(--text-color);
}

.photo-dropzone p {
    margin: 5px 0;
    color: #666;
}

.photo-dropzone .small-text {
    font-size: 12px;
    color: #999;
}

/* Photo Preview Container */
.photo-preview-container {
    margin-top: 15px;
    text-align: center;
}

.photo-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 2px solid var(--success-color);
    box-shadow: var(--shadow);
    margin-bottom: 10px;
}

.preview-info {
    color: var(--success-color);
    font-weight: 600;
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .photo-dropzone {
        padding: 30px 15px;
    }

    .dropzone-icon {
        font-size: 2rem;
    }

    .photo-preview {
        max-height: 250px;
    }
}

/* Detail View */
.detail-container {
    max-width: 700px;
    margin: 0 auto;
    margin-bottom: 30px;
}

.detail-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.detail-card h2 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.detail-info {
    margin-bottom: 30px;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-label {
    font-weight: 600;
    min-width: 150px;
    color: var(--text-color);
}

.info-value {
    flex: 1;
    color: #666;
    word-break: break-word;
}

.photo-section {
    margin: 30px 0;
    padding: 20px;
    background-color: var(--light-color);
    border-radius: 8px;
}

.photo-section h3 {
    margin-bottom: 15px;
}

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

.photo-preview {
    max-width: 100%;
    max-height: 500px;
    border-radius: 5px;
    box-shadow: var(--shadow);
}

.detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Navbar adjustments */
    .navbar {
        padding: 10px 0;
    }
    
    .navbar-brand {
        font-size: 16px;
    }
    
    .navbar-menu {
        gap: 8px;
        font-size: 12px;
    }
    
    .nav-link {
        padding: 6px 8px;
    }
    
    /* Container */
    .container {
        padding: 10px;
    }
    
    /* Dashboard */
    .dashboard-header h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    /* Form */
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 14px;
        padding: 8px;
    }
    
    /* Table Responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 12px;
        width: 100%;
    }
    
    table thead {
        display: none;
    }
    
    table tbody {
        display: block;
    }
    
    table tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        padding: 0;
    }
    
    table td {
        display: flex;
        justify-content: space-between;
        padding: 8px;
        border-bottom: 1px solid var(--border-color);
        text-align: right;
    }
    
    table td:last-child {
        border-bottom: none;
    }
    
    table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-color);
        flex: 1;
        text-align: left;
    }
    
    /* Buttons in mobile */
    .action-buttons-small {
        display: flex;
        flex-direction: column;
        gap: 6px;
        text-align: center !important;
    }
    
    .action-buttons-small::before {
        content: "Aksi";
    }
    
    .btn {
        padding: 8px 10px !important;
        font-size: 12px !important;
        width: 100%;
        display: inline-block;
    }
    
    .btn-sm {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }
    
    /* Detail view */
    .detail-card {
        padding: 15px;
    }
    
    .detail-card h2 {
        font-size: 18px;
        padding-bottom: 10px;
    }
    
    .info-row {
        flex-direction: column;
        padding: 8px 0;
    }
    
    .info-label {
        min-width: auto;
        margin-bottom: 3px;
        font-weight: 600;
        font-size: 12px;
    }
    
    .info-value {
        font-size: 13px;
    }
    
    .photo-preview {
        max-height: 300px;
    }
    
    .detail-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .detail-actions .btn {
        width: 100%;
    }
    
    /* Dropzone */
    .photo-dropzone {
        padding: 25px 15px;
    }
    
    .dropzone-icon {
        font-size: 2rem;
    }
    
    .photo-dropzone h4 {
        font-size: 14px;
    }
    
    .photo-dropzone p {
        font-size: 12px;
    }
    
    /* Badges */
    .badge {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    /* Footer */
    .footer {
        padding: 15px 10px;
        font-size: 12px;
    }
}

/* Form Container */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.profile-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.profile-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-weight: 500;
}

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

.btn-primary:hover {
    background-color: #5551cc;
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--dark-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #23262b;
    text-decoration: none;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    text-decoration: none;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    text-decoration: none;
}

.btn-warning {
    background-color: var(--warning-color);
    color: #333;
}

.btn-warning:hover {
    background-color: #e0a800;
    text-decoration: none;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.action-buttons-small {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #17a2b8;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: #333;
}

.badge-info {
    background-color: var(--info-color);
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

/* Dashboard Header */
.dashboard-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.dashboard-header h1 {
    margin-bottom: 5px;
}

.dashboard-header p {
    color: #666;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card-total {
    grid-column: 1 / -1;
}

.stat-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.stat-users { background-color: #e7f3ff; }
.stat-pending { background-color: #fff4e6; }
.stat-approved { background-color: #e6f7e6; }
.stat-rejected { background-color: #ffe6e6; }
.stat-total { background-color: #fff0f5; }

.stat-content h3 {
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

/* User Stats */
.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Dashboard Actions */
.dashboard-actions {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 30px;
}

.dashboard-actions h2 {
    margin-bottom: 15px;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 16px;
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover,
.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background-color: var(--light-color);
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Info Text */
.info-text {
    background-color: var(--light-color);
    padding: 10px 15px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 15px;
    border-radius: 4px;
}

/* Recent Cashback */
.recent-cashback {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 30px;
}

.recent-cashback h2 {
    margin-bottom: 20px;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    
    .container {
        padding: 15px;
    }
    
    .navbar {
        padding: 10px 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-menu {
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .nav-link {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .login-box {
        padding: 25px;
    }
    
    .form-container,
    .profile-card {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card-total {
        grid-column: 1;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
    }
    
    .action-buttons,
    .action-buttons-small {
        flex-direction: column;
    }
    
    .btn,
    .btn-sm {
        width: 100%;
    }
    
    .btn-block {
        display: block;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .dashboard-header {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }
    h3 { font-size: 1rem; }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-menu {
        gap: 5px;
    }
    
    .nav-link {
        padding: 4px 6px;
        font-size: 11px;
    }
    
    .login-box {
        padding: 20px;
    }
    
    .form-container,
    .profile-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .table {
        font-size: 11px;
    }
    
    .table th,
    .table td {
        padding: 8px 5px;
    }
    
    .btn,
    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .action-buttons-small {
        flex-direction: column;
        gap: 3px;
    }
}
