/* =========================================================
   GLOBAL RESET
========================================================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
}

body{
    margin:0;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
    background:#f4f6f9;
    color:#0f172a;
}

img{
    max-width:100%;
    height:auto;
}

a{
    text-decoration:none;
}

button,
input,
select,
textarea{
    font-family:inherit;
}

table{
    max-width:100%;
}

/* =========================================================
   LOGIN PAGE
========================================================= */

.login-bg{
    margin:0;
    min-height:100vh;

    background:
        linear-gradient(
            rgba(0,0,0,0.5),
            rgba(0,0,0,0.5)
        ),
        url('../img/wallpaper.jpg');

    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    background-attachment:fixed;

    display:flex;
    justify-content:center;
    align-items:center;

    font-family:'Segoe UI',sans-serif;
}

.login-container{
    width:380px;
    background:rgba(255,255,255,0.12);
    backdrop-filter:blur(14px);

    border:1px solid rgba(255,255,255,0.2);

    padding:40px 35px;
    border-radius:25px;

    box-shadow:
        0 10px 35px rgba(0,0,0,0.35);

    text-align:center;

    animation:fadeIn 0.8s ease;
}

.logo{
    width:120px;
    margin-bottom:15px;
}

.login-container h2{
    color:white;
    margin-bottom:25px;
    letter-spacing:2px;
    font-size:28px;
}

.input-box{
    width:100%;
    padding:14px 16px;
    margin-bottom:18px;

    border:none;
    border-radius:14px;

    background:rgba(255,255,255,0.15);
    color:white;

    font-size:14px;

    outline:none;
    transition:0.3s;
}

.input-box::placeholder{
    color:rgba(255,255,255,0.75);
}

.input-box:focus{
    background:rgba(255,255,255,0.22);

    box-shadow:
        0 0 10px rgba(255,255,255,0.25);

    transform:translateY(-2px);
}

.btn-login{
    width:100%;
    padding:14px;

    border:none;
    border-radius:14px;

    background:linear-gradient(135deg,#f59e0b,#ea580c);

    color:white;
    font-size:16px;
    font-weight:bold;

    cursor:pointer;
    transition:0.3s;
}

.btn-login:hover{
    transform:translateY(-3px);

    box-shadow:
        0 10px 20px rgba(0,0,0,0.3);
}

.alert{
    margin-top:15px;
    background:#dc2626;
    color:white;

    padding:12px;
    border-radius:12px;

    font-size:14px;
}

.footer{
    position:fixed;
    bottom:15px;
    width:100%;
    text-align:center;

    color:white;
    font-size:13px;
    letter-spacing:1px;
}

/* =========================================================
   DASHBOARD MENU
========================================================= */

.dashboard-logo{
    position:absolute;
    top:20px;
    right:30px;
    width:200px;
}

.dashboard-container{
    backdrop-filter:blur(8px);

    background:rgba(255,255,255,0.12);

    border:1px solid rgba(255,255,255,0.15);

    box-shadow:
        0 10px 30px rgba(0,0,0,0.25);

    border-radius:25px;

    padding:40px;
    max-width:100%;
}

.menu-title{
    color:white;
    font-size:42px;
    font-weight:bold;
    letter-spacing:2px;

    text-shadow:
        0 3px 10px rgba(0,0,0,0.4);
}

.company-name{
    margin-top:0;
    margin-bottom:30px;

    color:white;

    font-size:18px;
    font-weight:600;

    letter-spacing:1px;

    opacity:0.9;

    text-shadow:
        0 2px 8px rgba(0,0,0,0.35);
}

.menu-grid{
    display:flex;
    justify-content:center;
    gap:30px;
    flex-wrap:wrap;
}

.menu-btn{
    width:180px;
    padding:20px;
    border-radius:15px;
    border:none;
    font-size:18px;
    color:white;
    cursor:pointer;
    transition:0.3s;
}

.menu-btn:hover{
    transform:translateY(-3px);
}

.btn-green{
    background:#3aa655;
}

.btn-green:hover{
    background:#2e8444;
}

.btn-red{
    background:#e84132;
}

.btn-red:hover{
    background:#c73427;
}

.btn-jurnal{
    background:linear-gradient(135deg,#2563eb,#14b8a6);
    color:white;
}

.logout-container{
    display:flex;
    justify-content:center;
    margin-top:25px;
}

.btn-logout{
    background:linear-gradient(135deg,#2c2c2c,#000);
    color:white;
    padding:12px 40px;
    border-radius:50px;
    font-size:14px;
    border:none;
    box-shadow:0 8px 20px rgba(0,0,0,0.3);
    transition:0.3s;
}

.btn-logout:hover{
    background:#2b2b2b;
    transform:translateY(-2px);
    box-shadow:0 10px 20px rgba(0,0,0,0.3);
}

/* =========================================================
   TOPBAR / PAGE / FORM
========================================================= */

.topbar{
    background:white;
    padding:15px 30px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
    box-shadow:0 5px 15px rgba(0,0,0,0.1);
}

.topbar h2{
    margin:0;
}

.breadcrumb{
    font-size:12px;
    color:gray;
}

.btn-back{
    background:#1f5cc4;
    color:white;
    padding:8px 15px;
    border-radius:8px;
    text-decoration:none;
}

.page-wrapper{
    width:95%;
    max-width:1400px;
    margin:30px auto;
}

.container,
.content,
.card,
.chart-card,
.table-card,
.form-card,
.section-card{
    max-width:100%;
}

.form-card{
    background:white;
    padding:30px;
    border-radius:20px;
    box-shadow:0 10px 25px rgba(0,0,0,0.1);
}

.form-card h3{
    margin-bottom:20px;
}

.section-card{
    background:white;
    padding:25px;
    border-radius:15px;
    margin-bottom:25px;
    box-shadow:0 5px 15px rgba(0,0,0,0.08);
}

.section-card h3{
    margin-bottom:20px;
    border-left:5px solid #1f5cc4;
    padding-left:10px;
}

.form-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
}

.form-group{
    display:flex;
    flex-direction:column;
}

.form-group label{
    font-size:13px;
    font-weight:600;
    margin-bottom:5px;
}

.form-group input,
.form-group select,
.form-group textarea{
    padding:10px;
    border-radius:10px;
    border:1px solid #ccc;
    transition:0.2s;
    max-width:100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{
    border-color:#1f5cc4;
    box-shadow:0 0 5px rgba(31,92,196,0.3);
    outline:none;
}

.form-action{
    margin-top:25px;
}

.btn-submit{
    width:100%;
    padding:14px;
    background:linear-gradient(135deg,#1f5cc4,#174a9c);
    color:white;
    border:none;
    border-radius:12px;
    font-size:15px;
    cursor:pointer;
    transition:0.3s;
}

.btn-submit:hover{
    transform:translateY(-2px);
}

.btn-back-floating{
    position:fixed;
    top:20px;
    left:20px;
    background:#1f5cc4;
    color:white;
    width:45px;
    height:45px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    text-decoration:none;
    font-size:18px;
    box-shadow:0 5px 15px rgba(0,0,0,0.2);
    z-index:20;
}

.btn-back-floating:hover{
    transform:scale(1.1);
}

/* =========================================================
   TABLE / REPORT
========================================================= */

.table-responsive,
.table-card,
.section,
.dataTables_wrapper{
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}

.table-card{
    background:rgba(255,255,255,.86);
    border-radius:24px;
    padding:18px;
    box-shadow:0 18px 45px rgba(15,23,42,.08);
}

table{
    border-collapse:collapse;
}

th,
td{
    word-break:normal;
}

/* =========================================================
   MOBILE SIDEBAR
========================================================= */

.mobile-menu-btn{
    display:none;
}

.sidebar-overlay{
    display:none;
}

/* =========================================================
   ANIMATION
========================================================= */

@keyframes fadeIn{
    from{
        opacity:0;
        transform:translateY(20px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }
}

/* =========================================================
   RESPONSIVE TABLET
========================================================= */

@media(max-width:1000px){
    .form-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

/* =========================================================
   RESPONSIVE MOBILE
========================================================= */

@media(max-width:768px){

    html,
    body{
        width:100%;
        max-width:100%;
        overflow-x:hidden;
    }

    body{
        padding:14px !important;
        background-attachment:scroll !important;
    }

    /* LOGIN */
    .login-bg{
        padding:18px !important;
        min-height:100vh !important;
        justify-content:center !important;
        align-items:center !important;
    }

    .login-container{
        width:100% !important;
        max-width:360px !important;
        padding:28px 22px !important;
        border-radius:22px !important;
    }

    .login-container h2{
        font-size:24px !important;
    }

    .logo{
        width:100px !important;
    }

    /* DASHBOARD MENU */
    .dashboard-logo{
        position:relative !important;
        top:auto !important;
        right:auto !important;
        display:block !important;
        width:150px !important;
        margin:0 auto 20px !important;
    }

    .dashboard-container{
        width:100% !important;
        padding:24px 18px !important;
        border-radius:22px !important;
        margin-top:20px !important;
    }

    .menu-title{
        font-size:30px !important;
        text-align:center !important;
    }

    .company-name{
        font-size:14px !important;
        text-align:center !important;
        margin-bottom:22px !important;
    }

    .menu-grid{
        display:grid !important;
        grid-template-columns:1fr !important;
        gap:14px !important;
        width:100% !important;
    }

    .menu-btn{
        width:100% !important;
        min-height:56px !important;
        font-size:16px !important;
    }

    .logout-container{
        position:relative !important;
        margin-top:20px !important;
        text-align:center !important;
    }

    .footer{
        position:relative !important;
        text-align:center !important;
        font-size:12px !important;
        margin-top:24px !important;
        padding-bottom:14px !important;
    }

    /* TOPBAR */
    .topbar,
    .header{
        flex-direction:column !important;
        align-items:flex-start !important;
        gap:14px !important;
        width:100% !important;
    }

    .title h1,
    .header h1{
        font-size:24px !important;
        line-height:1.2 !important;
    }

    /* LAYOUT */
    .page-wrapper{
        width:100% !important;
        margin:18px auto !important;
    }

    .container,
    .content,
    .form-card,
    .section-card,
    .card,
    .summary-card,
    .chart-card,
    .table-card{
        width:100% !important;
        max-width:100% !important;
        padding:20px !important;
        border-radius:22px !important;
    }

    .grid,
    .summary,
    .summary-grid,
    .form-grid{
        grid-template-columns:1fr !important;
        gap:16px !important;
        width:100% !important;
    }

    .value,
    .summary-value,
    .card-value{
        font-size:24px !important;
        line-height:1.2 !important;
        word-break:break-word !important;
    }

    /* FORM */
    .filter,
    .filter-box,
    form{
        width:100% !important;
        flex-direction:column !important;
        align-items:stretch !important;
    }

    .filter input,
    .filter select,
    .filter button,
    .filter a,
    .filter-box input,
    .filter-box select,
    .filter-box button,
    .filter-box a,
    form input,
    form select,
    form textarea,
    form button{
        width:100% !important;
        max-width:100% !important;
    }

    /* TABLE */
    .table-wrap,
    .table-responsive,
    .table-card,
    .section,
    .dataTables_wrapper{
        width:100% !important;
        max-width:100% !important;
        overflow-x:auto !important;
        -webkit-overflow-scrolling:touch !important;
    }

    table{
        min-width:900px;
    }

    th,
    td{
        font-size:12px !important;
        white-space:nowrap;
    }

    /* SIDEBAR MOBILE */
    .mobile-menu-btn{
        display:inline-flex !important;
        align-items:center;
        justify-content:center;
        gap:8px;

        position:fixed;
        top:14px;
        left:14px;
        z-index:10001;

        padding:10px 14px;
        border:none;
        border-radius:14px;

        background:#111827;
        color:white;

        font-size:14px;
        font-weight:800;
        cursor:pointer;

        box-shadow:0 12px 30px rgba(15,23,42,.25);
    }

    .sidebar{
        position:fixed !important;
        top:0 !important;
        left:-280px !important;

        width:260px !important;
        height:100vh !important;

        z-index:10000 !important;

        transition:.3s ease !important;
        overflow-y:auto !important;
    }

    .sidebar.active{
        left:0 !important;
    }

    .sidebar-overlay{
        display:none;
        position:fixed;
        inset:0;
        background:rgba(0,0,0,.45);
        z-index:9999;
    }

    body.sidebar-open .sidebar-overlay{
        display:block;
    }

    .main-with-sidebar{
        margin-left:0 !important;
        width:100% !important;
        padding:70px 14px 16px !important;
    }

    .btn-back-floating{
        top:70px !important;
        left:14px !important;
    }
}