﻿/* =========================================
   1. GLOBAL STYLES & TYPOGRAPHY
   ========================================= */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    background-color: #f9fafb;
    /*font-family: 'Open Sans', Helvetica, Arial, sans-serif !important;*/
    color: #333;
}

/* Focus states for accessibility */
.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 #258cfb;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.sticky-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1020;
    background: linear-gradient(to right, #188aca 0%, #af55ff 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar {
    padding: 0 !important;
    min-height: 65px;
}

.header-logo {
    height: 28px;
    width: auto;
}

/* Nav Links Base */
.navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    padding: 1rem 0.5rem !important;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

    .navbar-nav .nav-link:hover {
        opacity: 0.8;
    }

    .navbar-nav .nav-link.active {
        border-bottom: 3px solid #22c55e !important;
        font-weight: 600;
    }

/* Mobile Adjustments */
@media (max-width: 991.98px) {
    .navbar-nav {
        text-align: center;
    }

    .sticky-header {
        position: relative;
    }

    #auth-buttons {
        margin-top: 1rem;
        justify-content: center !important;
    }
}

/* Navbar Toggle icon color fix */
.navbar-toggler {
    border-color: rgba(255,255,255,0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* =========================================
   3. INVOICE LAYOUT & CARDS
   ========================================= */
.container {
    max-width: 1320px;
    margin: 30px auto;
}

.invoice-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
    width: 80%!important;
   
}

.logo-placeholder {
    border: 2px dashed #cbd5e1;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #64748b;
    border-radius: 8px;
    background-color: #f1f5f9;
    padding: 10px;
}

    .logo-placeholder img {
        max-width: 100%;
        max-height: 100px;
        object-fit: contain;
    }

/* =========================================
   4. FORM ELEMENTS
   ========================================= */
.form-control {
    text-align: right;
}

    .form-control.input-sm {
        height: 35px;
        width: 65%;
    }

.form-label {
    font-size: 14px;
    color: #1e293b;
    width: 30%;
    text-align: right;
}

/* Kendo Validation Fixes */
.k-callout {
    display: none !important;
}

.k-tooltip-validation {
    position: absolute;
    top: 100%;
    z-index: 10;
    background-color: #ef4444 !important;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 2px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* =========================================
   5. KENDO GRID STYLING
   ========================================= */
.k-grid {
    border: none !important;
}

.k-grid-header {
    border-bottom: 2px solid #333 !important;
    background: transparent !important;
}

.btn-add-custom {
    background-color: #2c3e50 !important;
    color: white !important;
    border: none !important;
    padding: 5px 15px !important;
    font-size: 13px !important;
}

/* Grid Action Icons */
.k-grid-delete {
    background: transparent !important;
    border: none !important;
    color: #ef4444 !important;
}

    .k-grid-delete:hover {
        background: #fee2e2 !important;
        color: #b91c1c !important;
    }

/* =========================================
   6. TOTALS SECTION
   ========================================= */
.totals-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 20px;
    border-top: 1px solid #edf2f7;
    padding: 15px 15px 0 0;
}

.totals-group {
    display: grid;
    grid-template-columns: 120px 100px;
    gap: 20px;
    margin-bottom: 8px;
}

.totals-label {
    text-align: right;
    color: #64748b;
    font-weight: 400;
}

.totals-value {
    text-align: right;
    font-weight: 600;
}

/* =========================================
   7. UTILITIES
   ========================================= */
.text-right {
    text-align: right;
}

.btn-primary {
    background-color: #22c55e;
    border-color: #22c55e;
}

.btn-outline-primary {
    color: #1e293b;
    border-color: #1e293b;
}

.k-input-solid:focus, .k-input-solid.k-focus {
    border-color: #3b82f6; /* Blue border on hover */
    background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.k-picker-solid:focus, .k-picker-solid.k-focus {
    border-color: #3b82f6; /* Blue border on hover */
    background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.k-input-solid:focus-within {
    border-color: #3b82f6; /* Blue border on hover */
    background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
