/* IT Asset Manager - Main Stylesheet */
/* Cultivate-inspired styling */

/* ============================================
   CSS VARIABLES - Cultivate Color Palette
   ============================================ */
:root {
    /* Brand Colors */
    --cultivate-primary-orange: #EF9336;
    --cultivate-primary-red-orange: #FA5424;
    --cultivate-dark-blue-gray: #1c2b36;
    --cultivate-medium-blue-gray: #334455;
    
    /* Brand Gradients */
    --cultivate-gradient-primary: linear-gradient(104.47deg, #EF9336 11.93%, #FA5424 64.22%);
    
    /* Neutral Colors */
    --cultivate-black: #000000;
    --cultivate-white: #FFFFFF;
    --cultivate-gray-medium: #808080;
    --cultivate-gray-light: rgba(245, 245, 252, 1);
    --cultivate-gray-border: rgba(214, 213, 213, 1);
    --cultivate-gray-text: rgba(172, 172, 185, 1);
    --cultivate-gray-dark: rgba(53, 71, 84, 1);
    --cultivate-gray-darker: rgba(61, 75, 85, 1);
    
    /* Sidebar Colors */
    --cultivate-sidebar-bg: rgba(28, 43, 54, 1);
    --cultivate-sidebar-bg-transparent: rgba(28, 43, 54, 0.95);
    --cultivate-sidebar-text: rgba(255, 255, 255, 1);
    --cultivate-sidebar-nav-text: rgba(0, 0, 0, 0.9);
    --cultivate-sidebar-border: rgba(255, 255, 255, 0.2);
    --cultivate-sidebar-active: rgba(184, 203, 249, 1);
    
    /* Card Colors */
    --cultivate-card-bg: rgba(245, 245, 252, 1);
    --cultivate-card-border: #808080;
    --cultivate-card-header-dot: rgba(250, 84, 36, 1);
    
    /* State Colors */
    --cultivate-valid: #26b050;
    --cultivate-invalid: #e50000;
    --cultivate-error: #b32121;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
html, body {
    font-family: "Funnel Sans", Georgia, "Times New Roman", serif;
    font-weight: 300;
    letter-spacing: -0.01em;
    background-color: var(--cultivate-gray-light);
}

h1:focus {
    outline: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Funnel Display", Georgia, "Times New Roman", serif;
    color: var(--cultivate-dark-blue-gray);
}

strong, b {
    font-weight: 700;
}

/* ============================================
   LINKS
   ============================================ */
a, .btn-link {
    color: var(--cultivate-medium-blue-gray);
    text-decoration: none;
}

a:hover, .btn-link:hover {
    color: var(--cultivate-primary-orange);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    font-family: "Funnel Display", Georgia, "Times New Roman", serif;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn > i {
    margin-right: 10px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    color: var(--cultivate-medium-blue-gray);
    font-weight: 400;
    background-color: transparent;
    border: 2px solid var(--cultivate-medium-blue-gray);
}

.btn-primary:hover {
    background-color: var(--cultivate-medium-blue-gray);
    color: var(--cultivate-white);
    border-color: var(--cultivate-medium-blue-gray);
}

.btn-secondary {
    background-color: var(--cultivate-white);
    border: 1px solid var(--cultivate-white);
    color: rgba(28, 43, 54, 1);
}

.btn-secondary:hover {
    background-color: var(--cultivate-white);
    border: 1px solid rgba(28, 43, 54, 1);
    color: rgba(28, 43, 54, 1);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--cultivate-primary-orange);
}

/* ============================================
   LAYOUT
   ============================================ */
.page {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
}

.sidebar {
    display: flex;
    flex-direction: column;
    width: 100px;
    height: 100vh;
    height: 100dvh;
    background-color: var(--cultivate-sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.nav-menu__items {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.nav-menu__logout {
    margin-top: auto;
    background-color: var(--cultivate-sidebar-bg);
    flex: 0 0 auto;
}

.nav-link--logout {
    border-top: 1px solid var(--cultivate-sidebar-border);
    border-bottom: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

main {
    flex: 1 1 auto;
    margin-left: 100px;
    width: calc(100% - 100px);
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--cultivate-gray-light);
    padding: 20px;
    overflow-y: auto;
}

.content {
    padding-top: 1.1rem;
}

.top-row {
    background-color: var(--cultivate-white);
    border-bottom: 1px solid var(--cultivate-gray-border);
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar-brand {
    font-family: "Funnel Display", Georgia, "Times New Roman", serif;
    color: var(--cultivate-white) !important;
    font-size: 14px;
    text-align: center;
    padding: 10px;
}

.sidebar__logo {
    width: 100%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.sidebar__logo a {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    line-height: 1.2;
}

.sidebar__logo a span {
    display: inline-block;
    opacity: 0.3;
    font-size: 10px;
    font-weight: 300;
}

.sidebar__logo img {
    max-width: 50px;
    margin-bottom: 5px;
}


.nav-item {
    width: 100%;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    font-size: 12px;
    text-decoration: none;
    color: var(--cultivate-sidebar-text);
    background: transparent;
    font-weight: 400;
    line-height: 1.75;
    border-bottom: 1px solid var(--cultivate-sidebar-border);
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background: var(--cultivate-gray-darker);
    color: var(--cultivate-sidebar-text);
}

.nav-link.active {
    background-color: var(--cultivate-gray-darker);
}

.nav-link .oi {
    font-size: 20px;
    margin-bottom: 5px;
    display: block;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: var(--cultivate-card-bg);
    border: 1px solid var(--cultivate-card-border);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--cultivate-gray-border);
    font-family: "Funnel Display", Georgia, "Times New Roman", serif;
    font-weight: 500;
}

/* ============================================
   FORMS
   ============================================ */
.form-control {
    border: 1px solid var(--cultivate-gray-border);
    border-radius: 8px;
    font-family: "Funnel Sans", Georgia, "Times New Roman", serif;
}

.form-control:focus {
    border-color: var(--cultivate-primary-orange);
    box-shadow: 0 0 0 0.2rem rgba(239, 147, 54, 0.25);
}

.form-label {
    font-family: "Funnel Display", Georgia, "Times New Roman", serif;
    font-weight: 500;
    color: var(--cultivate-dark-blue-gray);
}

/* ============================================
   VALIDATION
   ============================================ */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--cultivate-valid);
}

.invalid {
    outline: 1px solid var(--cultivate-invalid);
}

.validation-message {
    color: var(--cultivate-error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-brand-primary {
    color: var(--cultivate-primary-orange);
}

.text-brand-secondary {
    color: var(--cultivate-primary-red-orange);
}

.text-dark-blue-gray {
    color: var(--cultivate-dark-blue-gray);
}

.bg-brand-gradient {
    background: var(--cultivate-gradient-primary);
}

.bg-sidebar {
    background-color: var(--cultivate-sidebar-bg);
}

.bg-card {
    background-color: var(--cultivate-card-bg);
}

.border-card {
    border-color: var(--cultivate-card-border);
}

.bg-orange {
    background-color: #f4b183 !important;
}

.table-financial-attention {
    --bs-table-bg: #ffe5cc;
    --bs-table-striped-bg: #f8dbc0;
    --bs-table-hover-bg: #f4cda8;
    --bs-table-color: #5a3b00;
    color: #5a3b00;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 15px;
}

.section-title h3 {
    font-size: 45px;
    font-weight: 500;
    margin-bottom: 0;
    line-height: 1;
    color: rgba(28, 43, 54, 1);
}

@media screen and (max-width: 1000px) {
    .section-title h3 {
        font-size: 30px;
    }
}

/* ============================================
   PAGE SECTIONS
   ============================================ */
.page-section {
    margin-bottom: 60px;
}

/* ============================================
   ERROR UI
   ============================================ */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ============================================
   LOADING
   ============================================ */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    fill: none;
    stroke: var(--cultivate-primary-orange);
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
    animation: fill-rotate 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    stroke-linecap: round;
}

.loading-progress-text {
    position: relative;
    text-align: center;
    font-weight: bold;
    margin-top: 1rem;
    font-family: "Funnel Display", Georgia, "Times New Roman", serif;
    color: var(--cultivate-dark-blue-gray);
}

@keyframes fill-rotate {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 100, 200;
        stroke-dashoffset: -20;
    }
    100% {
        stroke-dasharray: 100, 200;
        stroke-dashoffset: -120;
    }
}

/* ============================================
   BOOTSTRAP COLOR OVERRIDES - Cultivate Brand
   ============================================ */

/* Override bg-primary to use Cultivate orange */
.bg-primary {
    background-color: var(--cultivate-primary-orange) !important;
}

/* Override bg-info to use Cultivate medium blue-gray */
.bg-info {
    background-color: var(--cultivate-medium-blue-gray) !important;
}

/* Override bg-success to use Cultivate dark blue-gray */
.bg-success {
    background-color: var(--cultivate-dark-blue-gray) !important;
}

/* Override bg-warning to use a lighter orange tone */
.bg-warning {
    background-color: #f4a261 !important;
}

/* Override bg-danger to use Cultivate red-orange */
.bg-danger {
    background-color: var(--cultivate-primary-red-orange) !important;
}

/* Override bg-secondary */
.bg-secondary {
    background-color: var(--cultivate-gray-medium) !important;
}

/* Override table-dark to use Cultivate dark blue-gray */
.table-dark {
    background-color: var(--cultivate-dark-blue-gray) !important;
    color: var(--cultivate-white) !important;
}

.table-dark th {
    background-color: var(--cultivate-dark-blue-gray) !important;
    color: var(--cultivate-white) !important;
    border-color: var(--cultivate-medium-blue-gray) !important;
}

/* Ensure text colors work with new backgrounds */
.bg-primary .text-white,
.bg-info .text-white,
.bg-success .text-white,
.bg-danger .text-white {
    color: var(--cultivate-white) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media screen and (max-width: 450px) {
    .btn {
        font-size: 12px;
    }
    
    .section-title h3 {
        font-size: 24px;
    }
}
