﻿/* Glass theme, emerald and lime */

body {
    margin: 0;
    padding: 0 !important;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e6f4ec 0%, #f4faf5 30%, #e4f1e8 60%, #e0ece4 100%);
    background-attachment: fixed;
    color: #334155;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.09) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(132, 204, 22, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.04) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.06);
}

.sidebar-brand {
    display: block;
    padding: 0 1.5rem 2rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #047857, #65a30d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-brand:hover,
.sidebar-brand:focus {
    text-decoration: none;
    opacity: 0.85;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.sidebar-section {
    padding: 1.2rem 1.5rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 0.5rem;
}

.sidebar-nav li a {
    display: block;
    padding: 0.85rem 1.5rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li a:focus {
    color: #1e293b;
    background: rgba(0, 0, 0, 0.03);
    border-left-color: #047857;
    text-decoration: none;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #334155;
    font-size: 1.4rem;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    line-height: 44px;
    text-align: center;
    padding: 0;
}

.sidebar-toggle:hover {
    background: rgba(4, 120, 87, 0.08);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.2);
}

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

/* Main content */
.main-content {
    margin-left: 240px;
    min-height: 100vh;
    padding: 2.5rem 3rem;
    position: relative;
    z-index: 1;
}

.card,
.glass-panel {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.glass-panel {
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #1e293b;
    font-weight: 600;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #047857, #65a30d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p, address, li, dd {
    color: #475569;
    line-height: 1.7;
}

dt {
    color: #1e293b;
}

a {
    color: #047857;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: #059669;
    text-decoration: none;
}

code {
    background: rgba(4, 120, 87, 0.07);
    color: #065f46;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #047857, #15803d);
    border: 1px solid rgba(4, 120, 87, 0.2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(4, 120, 87, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #065f46, #166534);
    box-shadow: 0 6px 20px rgba(4, 120, 87, 0.35);
    transform: translateY(-1px);
    color: #fff;
}

.btn-default,
.btn-outline-dark {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #047857;
}

.btn-default:hover,
.btn-default:focus,
.btn-outline-dark:hover,
.btn-outline-dark:focus {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(4, 120, 87, 0.25);
    color: #065f46;
    transform: translateY(-1px);
}

/* Forms */
.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    color: #1e293b;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.85);
    border-color: rgba(4, 120, 87, 0.4);
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.1);
    color: #1e293b;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="select"] {
    max-width: 280px;
}

.password-input-group {
    max-width: 280px;
}

.password-input-group .form-control {
    max-width: none;
}

.password-toggle {
    display: inline-flex;
    align-items: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.password-toggle .password-icon {
    vertical-align: -0.125em;
}

.password-caps-warning {
    max-width: 280px;
}

.authenticator-qr svg {
    width: 200px;
    height: 200px;
}

/* Tables, tabs, alerts */
.table {
    --bs-table-bg: transparent;
}

.nav-tabs {
    border-bottom-color: rgba(4, 120, 87, 0.15);
}

.nav-tabs .nav-link {
    color: #64748b;
    border-radius: 10px 10px 0 0;
}

.nav-tabs .nav-link:hover {
    color: #047857;
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: #047857;
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(4, 120, 87, 0.15) rgba(4, 120, 87, 0.15) transparent;
}

.alert {
    border-radius: 12px;
}

.alert-danger {
    background: rgba(254, 226, 226, 0.7);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #b91c1c;
}

.alert-success {
    background: rgba(220, 252, 231, 0.7);
    border: 1px solid rgba(22, 163, 74, 0.2);
    color: #15803d;
}

.text-danger {
    color: #dc2626;
}

.dl-horizontal dt {
    white-space: normal;
}

.site-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.85rem;
}

.site-footer p {
    color: #94a3b8;
}

@media screen and (max-width: 767px) {
    .sidebar {
        padding-top: 4.5rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem 1rem;
        padding-top: 4.5rem;
    }
}
