/**
 * Wildlife Rescue South Coast - Admin Theme
 * Refined styling - subtle and professional
 */

:root {
    --wrsc-green-dark: #2d5016;
    --wrsc-green: #4a7c23;
    --wrsc-green-light: #6b9b37;
    --wrsc-green-muted: #5a8a3a;
    --wrsc-cream: #f8f9f5;
}

/* ============================================
   SIDEBAR STYLING
   ============================================ */

.sidebar.sidebar-dark,
.sidebar-dark.sidebar,
div.sidebar,
.app-body .sidebar {
    background: linear-gradient(180deg, #3d6b24 0%, #4a7c23 100%) !important;
}

.sidebar .nav-link,
.sidebar .sidebar-nav .nav-link,
.sidebar-dark .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover,
.sidebar-dark .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-left-color: rgba(255, 255, 255, 0.5);
    color: #fff !important;
}

.sidebar .nav-link.active,
.sidebar-dark .nav-link.active {
    background: rgba(255, 255, 255, 0.15) !important;
    border-left-color: #fff;
    color: #fff !important;
}

.sidebar .nav-link .nav-icon,
.sidebar-dark .nav-link .nav-icon,
.sidebar .nav-icon {
    color: rgba(255, 255, 255, 0.7) !important;
}

.sidebar .nav-link:hover .nav-icon,
.sidebar .nav-link.active .nav-icon {
    color: #fff !important;
}

.sidebar .nav-title,
.sidebar-dark .nav-title {
    color: rgba(255, 255, 255, 0.5) !important;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar .sidebar-brand,
.sidebar-brand {
    background: rgba(0, 0, 0, 0.15) !important;
}

.sidebar .sidebar-minimizer,
.sidebar-minimizer {
    background: rgba(0, 0, 0, 0.1) !important;
}

.sidebar .sidebar-minimizer:hover,
.sidebar-minimizer:hover {
    background: rgba(0, 0, 0, 0.2) !important;
}

.sidebar-minimizer::before {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 14'%3E%3Cpath fill='%23fff' d='M9.148 2.352l-4.148 4.148 4.148 4.148q0.148 0.148 0.148 0.352t-0.148 0.352l-1.297 1.297q-0.148 0.148-0.352 0.148t-0.352-0.148l-5.797-5.797q-0.148-0.148-0.148-0.352t0.148-0.352l5.797-5.797q0.148-0.148 0.352-0.148t0.352 0.148l1.297 1.297q0.148 0.148 0.148 0.352t-0.148 0.352z'/%3E%3C/svg%3E") !important;
}

.sidebar .nav-dropdown.open {
    background: rgba(0, 0, 0, 0.1) !important;
}

/* ============================================
   HEADER - Banner Style
   ============================================ */

.app-header,
header.app-header {
    background: linear-gradient(135deg, #2d5016 0%, #4a7c23 50%, #6b9b37 100%) !important;
    border-bottom: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    height: auto !important;
    min-height: 70px;
    padding: 10px 0;
}

/* Banner content container */
.wrsc-header-banner {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    margin-left: 15px;
}

.wrsc-header-banner .banner-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.wrsc-header-banner .banner-link:hover {
    text-decoration: none;
}

.wrsc-header-banner .banner-logo {
    height: 50px;
    margin-right: 15px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.wrsc-header-banner .banner-text h1 {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.wrsc-header-banner .banner-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    margin: 0;
}

/* Header nav links - now white on green */
.app-header .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
}

.app-header .nav-link:hover {
    color: #fff !important;
}

/* Hamburger menu icon - white on green */
.app-header .navbar-toggler,
.app-header .sidebar-toggler {
    color: #fff !important;
}

.app-header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

/* User dropdown in header */
.app-header .dropdown-toggle {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 25px;
    transition: background 0.2s ease;
}

.app-header .dropdown-toggle:hover {
    background: rgba(74, 124, 35, 0.08);
}

/* User avatar styling */
.app-header .img-avatar,
.app-header img[class*="avatar"] {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #4a7c23;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Breadcrumb area styling */
.app-header .breadcrumb {
    background: transparent;
    margin-bottom: 0;
    padding: 0;
}

.app-header .breadcrumb-item + .breadcrumb-item::before {
    color: #999;
}

/* Header dropdown menu */
.app-header .dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 0.5rem 0;
}

.app-header .dropdown-item {
    padding: 0.5rem 1.25rem;
    transition: background 0.15s ease;
}

.app-header .dropdown-item:hover {
    background: rgba(74, 124, 35, 0.08);
    color: #4a7c23;
}

.app-header .dropdown-item i,
.app-header .dropdown-item .la {
    margin-right: 8px;
    color: #4a7c23;
}

/* ============================================
   BUTTONS - Primary only, keep others default
   ============================================ */

.btn-primary {
    background: #4a7c23 !important;
    border-color: #4a7c23 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: #3d6b24 !important;
    border-color: #3d6b24 !important;
}

.btn-outline-primary {
    color: #4a7c23 !important;
    border-color: #4a7c23 !important;
}

.btn-outline-primary:hover {
    background: #4a7c23 !important;
    color: #fff !important;
}

.btn-success {
    background: #4a7c23 !important;
    border-color: #4a7c23 !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background: #3d6b24 !important;
    border-color: #3d6b24 !important;
}

/* ============================================
   TABLES - Subtle styling, not heavy green
   ============================================ */

.table thead th,
table.dataTable thead th,
table.table thead th {
    background: #f8f9fa !important;
    color: #333 !important;
    border-bottom: 2px solid #4a7c23 !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafbf8;
}

.table-hover tbody tr:hover {
    background-color: rgba(74, 124, 35, 0.05) !important;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
}

/* ============================================
   FORMS
   ============================================ */

.form-control:focus {
    border-color: #4a7c23 !important;
    box-shadow: 0 0 0 0.15rem rgba(74, 124, 35, 0.15) !important;
}

/* ============================================
   PAGINATION
   ============================================ */

.page-item.active .page-link {
    background-color: #4a7c23 !important;
    border-color: #4a7c23 !important;
}

.page-link {
    color: #4a7c23;
}

.page-link:hover {
    color: #3d6b24;
}

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

a {
    color: #4a7c23;
}

a:hover {
    color: #3d6b24;
}

/* ============================================
   FOOTER
   ============================================ */

.app-footer {
    border-top: 1px solid #e0e0e0 !important;
    background: #f8f9fa;
}

/* ============================================
   MISC ACCENTS
   ============================================ */

.badge-primary,
.bg-primary {
    background-color: #4a7c23 !important;
}

/* Alert success - WRSC green tones */
.alert-success {
    background-color: rgba(74, 124, 35, 0.15) !important;
    border-color: #6b9b37 !important;
    color: #2d5016 !important;
}

.bg-success {
    background-color: #6b9b37 !important;
}

.nav-pills .nav-link.active {
    background-color: #4a7c23;
}

.form-check-input:checked,
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #4a7c23 !important;
    border-color: #4a7c23 !important;
}

/* Breadcrumb */
.breadcrumb-item.active {
    color: #4a7c23;
}

/* Selection */
::selection {
    background: #4a7c23;
    color: #fff;
}

/* Rounded corner on main content area */
.main.pt-2,
.app-body > .main {
    border-top-left-radius: 20px !important;
    background: #e4e5e6 !important;
    position: relative;
    margin-left: -1px;
}

/* Ensure app-body has sidebar color as background so rounded corner shows */
.app-body {
    background: linear-gradient(180deg, #3d6b24 0%, #4a7c23 100%) !important;
}

/* Responsive header banner */
@media (max-width: 768px) {
    .wrsc-header-banner .banner-logo {
        height: 40px;
        margin-right: 10px;
    }

    .wrsc-header-banner .banner-text h1 {
        font-size: 1.1rem;
    }

    .wrsc-header-banner .banner-text p {
        font-size: 0.75rem;
    }
}
