@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #f4f7f5;
}

/* =========================
   SIDEBAR (AUTO FIT ERP STYLE)
========================= */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 270px;
    height: 100vh;
    background: linear-gradient(180deg, #7aa89c, #5f8f82, #4f7a70);
    color: #fff;
    padding: 18px 0;
    overflow-y: auto;
    box-shadow: 6px 0 25px rgba(0,0,0,0.12);
}

/* smooth scrollbar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
}

/* =========================
   TITLE (SYSTEM HEADER)
========================= */

.sidebar h2 {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

/* =========================
   MENU SECTION LABELS
========================= */

.menu-title {
    padding: 14px 20px 6px;
    font-size: 11px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    font-weight: 600;
}

/* =========================
   MENU LINKS
========================= */

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    margin: 3px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
}

/* icon alignment */
.sidebar a i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

/* hover effect (Sage Pastel glow) */
.sidebar a:hover {
    background: rgba(255,255,255,0.14);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* active menu */
.sidebar a.active {
    background: rgba(255,255,255,0.22);
    border-left: 4px solid #ffffff;
}

/* logout special style */
.logout {
    margin-top: 15px;
    background: rgba(255, 80, 80, 0.15);
}

.logout:hover {
    background: rgba(255, 80, 80, 0.25);
}

/* =========================
   RESPONSIVE AUTO FIT
========================= */

@media (max-width: 768px) {
    .sidebar {
        width: 220px;
    }

    .sidebar a {
        font-size: 13px;
        padding: 10px 14px;
    }

    .menu-title {
        font-size: 10px;
    }
}


@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* =========================
   MAIN DASHBOARD AREA
========================= */

.main {
    margin-left: 270px;
    padding: 28px;
    font-family: 'Inter', sans-serif;
    background: #f4f7f5;
}

/* =========================
   TOPBAR
========================= */

.topbar {
    background: linear-gradient(135deg, #ffffff, #f3f7f5);
    padding: 22px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    margin-bottom: 22px;
}

.topbar h1 {
    margin: 0;
    font-size: 24px;
    color: #2f3e46;
}

.topbar p {
    margin: 5px 0 0;
    color: #6c7c78;
}

/* =========================
   KPI GRID
========================= */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

/* =========================
   KPI CARD (MODERN ERP STYLE)
========================= */

.card {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    transition: all 0.25s ease-in-out;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(122,168,156,0.15);
}

/* soft background glow */
.card::before {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    background: rgba(122,168,156,0.12);
    border-radius: 50%;
    top: -50px;
    right: -50px;
}

/* ICON WRAPPER (NEW IMPROVEMENT) */
.card i {
    font-size: 18px;
    color: #fff;
    background: linear-gradient(135deg, #7aa89c, #5f8f82);
    padding: 14px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
    min-width: 46px;
    text-align: center;
}

/* TEXT AREA */
.card h3 {
    margin: 0;
    font-size: 22px;
    color: #2f3e46;
    font-weight: 600;
}

.card p {
    margin: 3px 0 0;
    font-size: 13px;
    color: #6c7c78;
}

/* HOVER EFFECT */
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.10);
}

/* =========================
   PANEL (BOTTOM SECTION)
========================= */

.panel {
    margin-top: 25px;
    background: #ffffff;
    padding: 22px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border-left: 5px solid #7aa89c;
}

.panel h2 {
    margin: 0 0 10px;
    color: #2f3e46;
}

.panel p {
    color: #6c7c78;
    line-height: 1.6;
}
/* =========================
   ERP FORM SYSTEM (SAGE STYLE)
========================= */

.form-container {
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-top: 20px;
}

/* FORM HEADINGS */
.form-container h2 {
    margin-bottom: 15px;
    color: #2f3e46;
    font-size: 18px;
}

/* GRID SYSTEM */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

/* FULL WIDTH FIELD */
.form-group.full {
    grid-column: span 2;
}

/* LABELS */
label {
    font-size: 13px;
    color: #5f6f6a;
    margin-bottom: 6px;
    font-weight: 500;
    display: block;
}

/* INPUT FIELDS */
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #dfe7e3;
    outline: none;
    font-size: 14px;
    background: #f9fbfa;
    transition: 0.25s;
    font-family: "Segoe UI", sans-serif;
}

/* FOCUS STATE */
input:focus,
select:focus,
textarea:focus {
    border-color: #7aa89c;
    box-shadow: 0 0 0 3px rgba(122,168,156,0.18);
    background: #ffffff;
}

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

/* =========================
   BUTTONS (ERP STYLE)
========================= */

.btn {
    padding: 12px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
    font-weight: 500;
}

/* PRIMARY BUTTON */
.btn-primary {
    background: linear-gradient(135deg, #7aa89c, #5f8f82);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/* SECONDARY BUTTON */
.btn-secondary {
    background: #e9f1ee;
    color: #2f3e46;
}

.btn-secondary:hover {
    background: #dceae5;
}

/* DANGER BUTTON */
.btn-danger {
    background: #ff6b6b;
    color: white;
}

.btn-danger:hover {
    background: #e85b5b;
}

/* =========================
   FORM ACTION AREA
========================= */

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* =========================
   SMALL FORM CARD VARIANT
========================= */

.form-card {
    background: #fff;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

/* =========================
   RESPONSIVE DESIGN
========================= */

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full {
        grid-column: span 1;
    }
}

/* =========================
   ERP TABLE STYLING
========================= */

.erp-table {
    width: 100%;
    border-collapse: collapse;
    font-size:11px;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    font-family: 'Inter', sans-serif;
}

/* HEADER */
.erp-table thead {
    background: linear-gradient(135deg, #7aa89c, #8aa6a3);
    color: #ffffff;
}

.erp-table thead th {
    padding: 14px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ROWS */
.erp-table tbody tr {
    border-bottom: 1px solid #f1f1f1;
    transition: all 0.2s ease-in-out;
}

.erp-table tbody tr:hover {
    background: #f6f9f8;
    transform: scale(1.01);
}

/* CELLS */
.erp-table td {
    padding: 12px;
    font-size: 14px;
    color: #333;
}

/* ACTION BUTTONS */
.erp-table .btn {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    margin-right: 5px;
    display: inline-block;
    transition: 0.2s;
}

/* EDIT BUTTON */
.erp-table .btn-secondary {
    background: #8aa6a3;
    color: #fff;
}

.erp-table .btn-secondary:hover {
    background: #6f8f8c;
}

/* DELETE BUTTON */
.erp-table .btn-danger {
    background: #c97c7c;
    color: #fff;
}

.erp-table .btn-danger:hover {
    background: #b35f5f;
}

/* STATUS BADGE */
.status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* ACTIVE */
.status.active {
    background: #b0c4b1;
    color: #fff;
}

/* INACTIVE */
.status.inactive {
    background: #d9a5a5;
    color: #fff;
}

/* RESPONSIVE TABLE */
@media screen and (max-width: 768px) {
    .erp-table {
        font-size: 12px;
    }

    .erp-table thead {
        display: none;
    }

    .erp-table, 
    .erp-table tbody, 
    .erp-table tr, 
    .erp-table td {
        display: block;
        width: 100%;
    }

    .erp-table tr {
        margin-bottom: 15px;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        padding: 10px;
    }

    .erp-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    .erp-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: 600;
        color: #666;
    }
}

/* =========================
   ACTION BUTTON GROUP
========================= */

.action-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Base button style */
.action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;
    text-decoration: none;

    font-size: 14px;

    transition: all 0.2s ease-in-out;

    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* VIEW */
.action-btn.view {
    background: #8aa6a3;
    color: #fff;
}

.action-btn.view:hover {
    background: #6f8f8c;
    transform: translateY(-2px);
}

/* MANAGE */
.action-btn.manage {
    background: #7aa89c;
    color: #fff;
}

.action-btn.manage:hover {
    background: #5f8d82;
    transform: translateY(-2px);
}

/* EDIT */
.action-btn.edit {
    background: #a3b18a;
    color: #fff;
}

.action-btn.edit:hover {
    background: #87996f;
    transform: translateY(-2px);
}

/* DELETE */
.action-btn.delete {
    background: #c97c7c;
    color: #fff;
}

.action-btn.delete:hover {
    background: #b35f5f;
    transform: translateY(-2px);
}

.back-btn{
    display:inline-flex;
    align-items:center;
    gap:8px;

    padding:10px 14px;
    background:#8aa6a3; /* sage pastel */
    color:#fff;

    border-radius:10px;
    text-decoration:none;

    font-size:14px;
    font-weight:500;

    box-shadow:0 4px 12px rgba(0,0,0,0.08);
    transition:0.2s;
}

.back-btn:hover{
    background:#6f8f8c;
    transform:translateY(-2px);
}

/* =========================
   GLOBAL MOBILE FIXES
========================= */

* {
    box-sizing: border-box;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
}

/* =========================
   TABLET + MOBILE SIDEBAR
========================= */

@media (max-width: 992px) {

    .sidebar {
        width: 220px;
    }

    .main {
        margin-left: 220px;
    }

    .card {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================
   MOBILE VIEW (SMARTPHONES)
========================= */

@media (max-width: 768px) {

    /* SIDEBAR becomes top bar style */
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px;
    }

    .sidebar h2 {
        width: 100%;
        text-align: center;
    }

    .sidebar a {
        flex: 1 1 45%;
        margin: 5px;
        justify-content: center;
        font-size: 12px;
        padding: 10px;
    }

    .menu-title {
        width: 100%;
        text-align: center;
    }

    /* MAIN AREA */
    .main {
        margin-left: 0;
        padding: 15px;
    }

    /* TOPBAR */
    .topbar {
        text-align: center;
        padding: 15px;
    }

    .topbar h1 {
        font-size: 18px;
    }

    /* KPI CARDS */
    .stats {
        grid-template-columns: 1fr;
    }

    .card {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }

    /* FORMS */
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full {
        grid-column: span 1;
    }

    /* TABLE RESPONSIVE */
    .erp-table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* ACTION BUTTONS */
    .action-group {
        flex-wrap: wrap;
        gap: 5px;
    }

    .action-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    /* SEARCH + TOOLBAR */
    .panel-toolbar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .search-form {
        width: 100%;
    }

    .search-form input {
        width: 100%;
    }

    .search-form button {
        width: 100%;
    }
}

/* =========================
   SMALL PHONES (VERY SMALL)
========================= */

@media (max-width: 480px) {

    .sidebar a {
        flex: 1 1 100%;
        font-size: 12px;
    }

    .card i {
        padding: 10px;
        font-size: 14px;
    }

    .card h3 {
        font-size: 18px;
    }

    .form-container {
        padding: 15px;
    }

    .btn {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .action-group {
        justify-content: center;
    }
}

/* LOGIN PAGE */

body.login-page{
margin:0;
font-family:'Inter',sans-serif;
background:#eef2f7;
}

.login-container{
display:flex;
min-height:100vh;
}

.login-left{
width:45%;
background:linear-gradient(135deg,#0d6efd,#0047b3);
color:#fff;
display:flex;
flex-direction:column;
justify-content:center;
align-items:center;
padding:40px;
text-align:center;
}

.login-left h1{
font-size:38px;
margin:20px 0 10px;
}

.login-left p{
font-size:18px;
line-height:1.8;
opacity:.95;
}

.logo{
width:120px;
margin-bottom:15px;
}

.login-right{
width:55%;
display:flex;
justify-content:center;
align-items:center;
background:#fff;
}

.login-right form{
width:420px;
background:#fff;
padding:40px;
border-radius:15px;
box-shadow:0 10px 40px rgba(0,0,0,.08);
}

.login-right h2{
margin-bottom:25px;
text-align:center;
}

.input-group{
position:relative;
margin-bottom:20px;
}

.input-group i{
position:absolute;
left:15px;
top:15px;
color:#666;
}

.input-group input{
width:100%;
padding:14px 45px;
border:1px solid #ddd;
border-radius:8px;
font-size:15px;
}

.show-password{
position:absolute;
right:12px;
top:10px;
border:none;
background:none;
cursor:pointer;
font-size:18px;
}

.login-btn{
width:100%;
padding:14px;
border:none;
background:#0d6efd;
color:#fff;
font-size:16px;
border-radius:8px;
cursor:pointer;
transition:.3s;
}

.login-btn:hover{
background:#0047b3;
}

.login-options{
display:flex;
justify-content:space-between;
margin-bottom:20px;
font-size:14px;
}

.login-options a{
text-decoration:none;
color:#0d6efd;
}

.login-error{
background:#ffe5e5;
color:#c00;
padding:12px;
margin-bottom:20px;
border-radius:6px;
}

.login-footer{
text-align:center;
margin-top:20px;
color:#777;
font-size:13px;
}

@media(max-width:900px){

.login-left{
display:none;
}

.login-right{
width:100%;
}

.login-right form{
width:90%;
}

}


/* LOGIN PAGE */

body.login-page{
margin:0;
font-family:'Inter',sans-serif;
background:#eef2f7;
}

.login-container{
display:flex;
min-height:100vh;
}

.login-left{
width:45%;
background:linear-gradient(135deg,#5f8f82,#5f8f82);
color:#fff;
display:flex;
flex-direction:column;
justify-content:center;
align-items:center;
padding:40px;
text-align:center;
}

.login-left h1{
font-size:38px;
margin:20px 0 10px;
}

.login-left p{
font-size:18px;
line-height:1.8;
opacity:.95;
}

.logo{
width:120px;
margin-bottom:15px;
}

.login-right{
width:55%;
display:flex;
justify-content:center;
align-items:center;
background:#fff;
}

.login-right form{
width:420px;
background:#fff;
padding:40px;
border-radius:15px;
box-shadow:0 10px 40px rgba(0,0,0,.08);
}

.login-right h2{
margin-bottom:25px;
text-align:center;
}

.input-group{
position:relative;
margin-bottom:20px;
}

.input-group i{
position:absolute;
left:15px;
top:15px;
color:#666;
}

.input-group input{
width:100%;
padding:14px 45px;
border:1px solid #ddd;
border-radius:8px;
font-size:15px;
}

.show-password{
position:absolute;
right:12px;
top:10px;
border:none;
background:none;
cursor:pointer;
font-size:18px;
}

.login-btn{
width:100%;
padding:14px;
border:none;
background:#5f8f82;
color:#fff;
font-size:16px;
border-radius:8px;
cursor:pointer;
transition:.3s;
}

.login-btn:hover{
background:#0047b3;
}

.login-options{
display:flex;
justify-content:space-between;
margin-bottom:20px;
font-size:14px;
}

.login-options a{
text-decoration:none;
color:#0d6efd;
}

.login-error{
background:#ffe5e5;
color:#c00;
padding:12px;
margin-bottom:20px;
border-radius:6px;
}

.login-footer{
text-align:center;
margin-top:20px;
color:#777;
font-size:13px;
}

@media(max-width:900px){

.login-left{
display:none;
}

.login-right{
width:100%;
}

.login-right form{
width:90%;
}

}