/* =====================================================
   SISTEM ePERMOHONAN JPNT - Custom Styles
   Modern, Minimalis, Professional dengan Bootstrap 5
   ===================================================== */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #0096FF;
    --primary-light: #33AAFF;
    --primary-dark: #0077CC;
    --secondary-color: #3182ce;
    --accent-color: #38b2ac;
    --success-color: #38a169;
    --warning-color: #d69e2e;
    --danger-color: #e53e3e;
    --info-color: #3182ce;
    --light-color: #f7fafc;
    --dark-color: #1a202c;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #718096;
    --gray-700: #4a5568;
    --gray-800: #2d3748;
    --gray-900: #1a202c;
    --sidebar-width: 280px;
    --header-height: 60px;
    --transition-speed: 0.3s;
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ===== Global Styles ===== */
body {
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

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

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-color);
    font-weight: 600;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* ===== Header / Navbar ===== */
.navbar-main {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    box-shadow: var(--box-shadow);
    height: var(--header-height);
    padding: 0.5rem 1.5rem;
    margin-left: var(--sidebar-width);
    z-index: 1010;
}

.navbar-text {
    color: #ffffff;
    font-size: 1.1rem;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
}

.navbar-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.navbar-user .user-info {
    line-height: 1.3;
}

.navbar-user .user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.navbar-user .user-role {
    font-size: 0.75rem;
    opacity: 0.85;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: #fff;
    box-shadow: var(--box-shadow);
    overflow-y: auto;
    z-index: 1020;
    transition: transform var(--transition-speed);
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #ffffff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    height: 60px;
    width: auto;
    margin-bottom: 0.75rem;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

.sidebar-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu .menu-label {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
}

.sidebar-menu .menu-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: var(--gray-700);
    transition: all var(--transition-speed);
    border-left: 3px solid transparent;
}

.sidebar-menu .menu-item:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

.sidebar-menu .menu-item.active {
    background-color: rgba(49, 130, 206, 0.08);
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
    font-weight: 500;
}

.sidebar-menu .menu-item i {
    width: 24px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* ===== Main Content ===== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
}

.main-content.full-width {
    margin-left: 0;
}

/* ===== Cards ===== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
    color: #ffffff !important;
    border-bottom: none;
}

.card-header.bg-primary h5,
.card-header.bg-primary small,
.card-header.bg-primary span {
    color: #ffffff !important;
}

.card-body {
    padding: 1.5rem;
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #fff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stats-card.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #48bb78 100%);
}

.stats-card.warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #ecc94b 100%);
}

.stats-card.danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #fc8181 100%);
}

.stats-card.info {
    background: linear-gradient(135deg, var(--info-color) 0%, #63b3ed 100%);
}

.stats-card .stats-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.2;
}

.stats-card .stats-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stats-card .stats-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===== Tables ===== */
.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--gray-100);
    border-bottom: 2px solid var(--gray-300);
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* ===== Forms ===== */
.form-control,
.form-select {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-label.required::after {
    content: ' *';
    color: var(--danger-color);
}

.form-text {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* File Input */
.form-control[type="file"] {
    padding: 0.5rem;
}

.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-speed);
    cursor: pointer;
}

.file-upload-wrapper:hover {
    border-color: var(--secondary-color);
    background-color: rgba(49, 130, 206, 0.05);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all var(--transition-speed);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #48bb78 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #fc8181 100%);
    border: none;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* ===== Status Badges ===== */
.badge {
    padding: 0.5em 0.85em;
    font-weight: 500;
    font-size: 0.8rem;
    border-radius: 50px;
}

/* ===== Alerts ===== */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: rgba(56, 161, 105, 0.1);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(229, 62, 62, 0.1);
    color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(214, 158, 46, 0.1);
    color: #b7791f;
}

.alert-info {
    background-color: rgba(49, 130, 206, 0.1);
    color: var(--info-color);
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--accent-color) 100%);
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.login-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    width: 100%;
    max-width: 420px;
    z-index: 1;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.login-header img {
    height: 80px;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.login-header p {
    opacity: 0.9;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.login-body {
    padding: 2rem;
}

/* ===== Homepage ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

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

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.step-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.step-desc {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* Common Mistakes Section */
.mistake-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(229, 62, 62, 0.05);
    border-left: 3px solid var(--danger-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin-bottom: 1rem;
}

.mistake-item i {
    color: var(--danger-color);
    font-size: 1.25rem;
}

/* Contact Section */
.contact-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

/* ===== PIC Card ===== */
.pic-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform var(--transition-speed);
}

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

.pic-card .pic-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gray-200);
}

.pic-card .pic-info {
    padding: 1.25rem;
}

.pic-card .pic-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.pic-card .pic-role {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.pic-card .pic-contact {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.pic-card .pic-contact i {
    width: 20px;
    color: var(--secondary-color);
}

/* ===== Footer ===== */
.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 0;
    margin-left: var(--sidebar-width);
    margin-top: 2rem;
}

.footer.full-width {
    margin-left: 0;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
}

.footer a:hover {
    color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
        z-index: 1030;
    }

    .navbar-main {
        margin-left: 0 !important;
    }

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

    .footer {
        margin-left: 0 !important;
    }

    .hero-title {
        font-size: 2rem;
    }
}


@media (max-width: 767.98px) {
    .main-content {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .stats-card {
        padding: 1rem;
    }

    .stats-card .stats-value {
        font-size: 1.5rem;
    }

    .login-card {
        margin: 1rem;
    }

    .hero-section {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }
}

/* ===== Utilities ===== */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-primary-light {
    background-color: rgba(49, 130, 206, 0.1) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    display: none;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.4rem 0.7rem;
    border-radius: var(--border-radius);
    font-size: 1.25rem;
    line-height: 1;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 991.98px) {
    .sidebar-toggle {
        display: inline-flex;
    }
}

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

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

/* Print Styles */
@media print {

    .sidebar,
    .navbar-main,
    .btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}