
:root {
    --green-dark:    #1b5e20;
    --green-main:    #2e7d32;
    --green-light:   #388e3c;
    --green-pale:    #e8f5e9;
    --green-border:  #c8e6c9;
    --bg-main:       #eef5e9;
    --text-muted:    #6c757d;
    --sidebar-width: 240px;
    --radius-card:   15px;
    --radius-btn:    8px;
    --shadow-card:   0 3px 12px rgba(0, 0, 0, 0.08);
    --shadow-modal:  0 10px 30px rgba(0, 0, 0, 0.15);
}


*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-main);
    color: #333;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: inherit;
}


::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--green-light); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-dark); }


.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--green-dark) 0%, var(--green-main) 100%);
    color: #fff;
    padding: 20px 14px;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.15);
}

.sidebar h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
    letter-spacing: 1px;
}

.sidebar hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.25);
    margin: 10px 0;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.88);
    padding: 10px 14px;
    border-radius: var(--radius-btn);
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sidebar a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar a:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding-left: 18px;
}

.sidebar a.active,
.sidebar a[style*="background:#2e7d32"],
.sidebar a[style*="background: #2e7d32"] {
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
    font-weight: 600;
    border-left: 3px solid #a5d6a7;
}


.content {
    margin-left: var(--sidebar-width);
    padding: 28px;
    min-height: 100vh;
}

.card {
    border: none !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-card) !important;
    background: #fff !important;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
}


.card.stat-card {
    border-left: 4px solid var(--green-main) !important;
}


.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.card-icon.green  { background: #e8f5e9; color: var(--green-main); }
.card-icon.blue   { background: #e3f2fd; color: #1565c0; }
.card-icon.yellow { background: #fff8e1; color: #f57f17; }
.card-icon.red    { background: #ffebee; color: #c62828; }
.card-icon.gray   { background: #f5f5f5; color: #616161; }
.card-icon.purple { background: #f3e5f5; color: #6a1b9a; }

.btn {
    border-radius: var(--radius-btn) !important;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease !important;
}

.btn:active {
    transform: scale(0.97);
}

.btn-success {
    background-color: var(--green-main) !important;
    border-color: var(--green-main) !important;
    color: #fff !important;
}
.btn-success:hover {
    background-color: var(--green-dark) !important;
    border-color: var(--green-dark) !important;
    box-shadow: 0 4px 12px rgba(46,125,50,0.35) !important;
}

.btn-outline-success {
    color: var(--green-main) !important;
    border-color: var(--green-main) !important;
}
.btn-outline-success:hover {
    background-color: var(--green-main) !important;
    color: #fff !important;
}

.btn-warning {
    background-color: #f9a825 !important;
    border-color: #f9a825 !important;
    color: #fff !important;
}
.btn-warning:hover {
    background-color: #e65100 !important;
    border-color: #e65100 !important;
    color: #fff !important;
}
.table {
    font-size: 13.5px;
    margin-bottom: 0;
}

.table thead th {
    font-weight: 600;
    font-size: 12.5px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 2px solid var(--green-border) !important;
}

.table-success thead {
    background-color: var(--green-pale) !important;
    color: var(--green-dark) !important;
}

.table tbody tr {
    transition: background 0.15s ease;
}

.table-hover tbody tr:hover {
    background-color: #f1f8e9 !important;
}

.table td, .table th {
    vertical-align: middle;
    padding: 10px 12px;
}


.badge {
    font-size: 11.5px;
    padding: 5px 11px;
    border-radius: 20px;
    font-weight: 500;
    letter-spacing: 0.2px;
}


.badge.bg-warning { color: #5d4037 !important; }

.form-control,
.form-select,
.input-group-text {
    border-radius: var(--radius-btn) !important;
    font-size: 13.5px;
    border-color: var(--green-border) !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--green-main) !important;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.15) !important;
    outline: none;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}

.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group > .input-group-text:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}


.alert {
    border-radius: 10px !important;
    font-size: 13.5px;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.alert-success { background: #e8f5e9 !important; color: #1b5e20 !important; }
.alert-danger  { background: #ffebee !important; color: #b71c1c !important; }
.alert-warning { background: #fff8e1 !important; color: #5d4037 !important; }
.alert-light   { background: #f9fbe7 !important; color: #555 !important; }

.modal-content {
    border: none !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-modal) !important;
}

.modal-header {
    border-radius: var(--radius-card) var(--radius-card) 0 0 !important;
    border-bottom: none !important;
    padding: 16px 20px;
}

.modal-footer {
    border-top: 1px solid #f0f0f0 !important;
    padding: 14px 20px;
}

.modal-body { padding: 20px; }


.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header h4 {
    font-weight: 700;
    color: var(--green-dark);
    margin: 0;
    font-size: 20px;
}

.topbar {
    background: linear-gradient(90deg, var(--green-main), var(--green-light));
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(46,125,50,0.3);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}


footer {
    margin-left: var(--sidebar-width);
    padding: 14px 28px;
    background: #f1f8e9;
    border-top: 1px solid var(--green-border);
    color: #558b2f;
    font-size: 12.5px;
    text-align: center;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 45%, #66bb6a 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22);
}

.login-card .logo {
    font-size: 52px;
    text-align: center;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.login-card h4 {
    text-align: center;
    color: var(--green-dark);
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 2px;
}

.login-card p.subtitle {
    text-align: center;
    color: #888;
    font-size: 13px;
    margin-bottom: 26px;
}

.tool-card {
    border: 1px solid var(--green-border) !important;
    border-radius: var(--radius-card) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(46,125,50,0.15) !important;
}

.text-green  { color: var(--green-main) !important; }
.bg-green    { background: var(--green-main) !important; color: #fff !important; }
.bg-pale     { background: var(--green-pale) !important; }
.rounded-xl  { border-radius: var(--radius-card) !important; }
.fw-600      { font-weight: 600 !important; }


.divider-text {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
    font-size: 12px;
    margin: 12px 0;
}
.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}


@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
        gap: 4px;
    }

    .sidebar a {
        padding: 8px 10px;
        font-size: 12px;
    }

    .content {
        margin-left: 0;
        padding: 15px;
    }

    footer {
        margin-left: 0;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
