﻿:root {
    /* Premium UI Variables */
    --brand-primary: #5856d6; /* Premium Indigo for Header */
    --brand-primary-dark: #4a48c4; /* Hover state */
    --sidebar-bg: #1c242b; /* Deep Slate Navy for Sidebar */
    --sidebar-hover: #2b3640;
    --body-bg: #f4f6f9; /* Softer body background */
    /* Backward Compatibility for your existing forms and loaders */
    --main-color: #5856d6;
    --loading-color: #5856d6;
}

body {
    /*padding-top: 50px;
    padding-bottom: 20px;*/
    font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--body-bg) !important;
}

/*:root {
    --main-color: #605ca8; 
    --loading-color: #605ca8; 
}

body {*/
/*padding-top: 50px;
    padding-bottom: 20px;*/
/*font-family: initial;
}*/


/* Set padding to keep content from hitting the edges */
/*.body-content {
    padding-left: 15px;
    padding-right: 15px;
}*/

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
/*.dl-horizontal dt {
    white-space: normal;
}*/

/* Set width on the form input elements since they're 100% wide by default */
/*input,
select,
textarea {
    max-width: 280px;
}*/
.content .table tbody tr.child {
    color: black;
}

div.box-header {
    background-color: var(--main-color);
}

.box.box-primary {
    border-top-color: var(--main-color);
}

.nav-tabs-custom > .nav-tabs > li.active {
    border-top-color: var(--main-color);
}

.box.box-info {
    border-top-color: var(--main-color);
}

.sidebar-menu > li > a > .fa, .sidebar-menu > li > a > .glyphicon, .sidebar-menu > li > a > .ion {
    width: 20px;
    color: var(--main-color);
}

.sidebar-menu .treeview-menu > li > a > .fa, .sidebar-menu .treeview-menu > li > a > .glyphicon, .sidebar-menu .treeview-menu > li > a > .ion {
    width: 20px;
    color: var(--main-color);
}

.skin-purple-light .sidebar a {
    color: var(--main-color);
}

.skin-purple-light .sidebar-menu > li:hover > a, .skin-purple-light .sidebar-menu > li.active > a {
    color: #605CFF;
    background: #f4f4f5;
}

.skin-purple-light .treeview-menu > li > a {
    color: var(--main-color);
}

    .skin-purple-light .treeview-menu > li.active > a, .skin-purple-light .treeview-menu > li > a:hover {
        color: #605CFF;
    }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: initial;
}

.box.box-solid.box-primary > .box-header {
    color: #ffffff;
    background: var(--main-color);
    background-color: var(--main-color);
}

.box.box-solid.box-primary {
    border: 1px solid #605ca8;
}

.box-footer {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
    border-top: 1px solid #605ca8;
    padding: 10px;
    background-color: #ffffff;
}

.content-header > .breadcrumb > li > a {
    color: #605CFF;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--main-color);
    border-color: #605CC2;
}

    .btn-primary:hover, .btn-primary:active, .btn-primary.hover {
        background-color: #605CC2;
    }

.pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus {
    z-index: 3;
    color: #fff;
    cursor: default;
    background-color: var(--main-color);
    border-color: var(--main-color);
}

.field-validation-error {
    color: #e80c4d;
    font-weight: bold;
}

input.input-validation-error {
    border: 1px solid #e80c4d;
}

.form-control:focus {
    border-color: var(--main-color);
    box-shadow: none;
}

.dropdown-menu li > a:hover, .dropdown-menu li > a:focus, .dropdown-submenu:hover > a {
    background-color: var(--main-color);
    color: white;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border: 1px solid #605ca8;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--main-color);
    color: white;
}

.table-hover > tbody > tr:hover {
    background-color: var(--main-color);
    color: white;
}

.box > .box-header > h3 {
    color: white;
}

.box .box-primary > .box-header {
    background-color: var(--main-color);
}

.box > .box-header {
    background-color: var(--main-color);
}

.box {
    border-top-color: var(--main-color);
}

.navbar-brand-centered {
    position: absolute;
    left: 43%;
    display: block;
    /* width: 160px; */
    text-align: center;
    /* background-color: #eee; */
}

.navbar > .container .navbar-brand-centered,
.navbar > .container-fluid .navbar-brand-centered {
    margin-left: -80px;
}

/*
    CSS for disable datepicker dates color
*/
.datepicker table tr td.disabled, .datepicker table tr td.disabled:hover {
    background: none;
    color: darkgray;
    cursor: default;
}


@media only screen and (max-width: 900px) {
    .navbar-brand-centered {
        position: absolute;
        left: 30%;
        display: block;
        /* width: 160px; */
        text-align: center;
        /* background-color: #eee; */
    }

    .navbar > .container .navbar-brand-centered,
    .navbar > .container-fluid .navbar-brand-centered {
        margin-left: -80px;
    }
}

@media only screen and (max-width: 400px) {
    .navbar-brand-centered {
        position: absolute;
        left: 30%;
        display: block;
        /* width: 160px; */
        text-align: center;
        /* background-color: #eee; */
    }

    .navbar > .container .navbar-brand-centered,
    .navbar > .container-fluid .navbar-brand-centered {
        margin-left: -80px;
    }
}


.popup {
    cursor: pointer;
}

    /* The actual popup (appears on top) */
    .popup .popuptext {
        visibility: hidden;
        width: 160px;
        background-color: #555;
        color: #fff;
        text-align: center;
        border-radius: 6px;
        padding: 8px 0;
        position: absolute;
        z-index: 1;
        bottom: 125%;
        left: 50%;
        margin-left: -80px;
    }

        /* Popup arrow */
        .popup .popuptext::after {
            content: "pop up";
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: #555 transparent transparent transparent;
        }

    /* Toggle this class when clicking on the popup container (hide and show the popup) */
    .popup .show {
        visibility: visible;
        -webkit-animation: fadeIn 1s;
        animation: fadeIn 1s
    }

/* Add animation (fade in the popup) */
@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.col1 {
    width: 25%;
    float: left;
    padding: 5px;
}

.col2 {
    width: 25%;
    float: left;
    padding: 5px;
}

.col3 {
    width: 25%;
    float: left;
    padding: 5px;
}

.col4 {
    width: 25%;
    float: left;
    padding: 5px;
}

.container {
    width: 100%;
}

.center-menu {
    position: absolute;
    top: 100%;
    /*left: -280px;*/
    left: -2700%;
    z-index: 1000;
    display: none;
    min-width: 1000px;
    padding: 5px 0;
    margin: 2px 0 0;
    font-size: 14px;
    text-align: left;
    list-style: none;
    background-color: #fff;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    border: 1px solid #ccc;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 4px;
    -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
    box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}

/*.btn-primary:active:hover, .btn-primary.active:hover, .open > .dropdown-toggle.btn-primary:hover, .btn-primary:active:focus, .btn-primary.active:focus, .open > .dropdown-toggle.btn-primary:focus, .btn-primary:active.focus, .btn-primary.active.focus, .open > .dropdown-toggle.btn-primary.focus {
    color: #fff;
    background-color: #204d74;
    border-color: #122b40;
}*/


/*
    CSS for loader
*/
.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: transparent;
    border: 3px, solid, #3c3c3c;
    border-radius: 50%;
    text-align: center;
    line-height: 150px;
    font-family: sans-serif;
    font-size: 20px;
    color: var(--main-color);
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--main-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, .5);
    font-weight: bold;
}

    .ring:before {
        content: '';
        position: absolute;
        top: -3px;
        left: -3px;
        width: 155px;
        height: 155px;
        border: 3px solid transparent;
        border-top: 3px solid var(--main-color);
        border-right: 3px solid var(--main-color);
        border-radius: 50%;
        animation: animateCircle 2s linear infinite;
    }

#loadingSpan {
    display: block;
    position: absolute;
    top: calc(50% - 2px);
    left: 50%;
    width: 50%;
    height: 4px;
    background: transparent;
    transform-origin: left;
    animation: animate 2s linear infinite;
}

    #loadingSpan:before {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--main-color);
        top: -6px;
        right: -8px;
        box-shadow: 0 0 20px var(--main-color);
    }

@keyframes animateCircle {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes animate {
    0% {
        transform: rotate(45deg);
    }

    100% {
        transform: rotate(405deg);
    }
}
/*
    End CSS for loader
*/



/* Set padding to keep content from hitting the edges */
/*.body-content {
    padding-left: 15px;
    padding-right: 15px;
}*/

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
/*.dl-horizontal dt {
    white-space: normal;
}*/

/* Set width on the form input elements since they're 100% wide by default */
/*input,
select,
textarea {
    max-width: 280px;
}*/

.content .table tbody tr.child {
    color: black;
}

div.box-header {
    background-color: var(--main-color);
}

.box.box-primary {
    border-top-color: var(--main-color);
}

.nav-tabs-custom > .nav-tabs > li.active {
    border-top-color: var(--main-color);
}

.box.box-info {
    border-top-color: var(--main-color);
}

.box.box-success {
    border-top-color: var(--main-color);
}

.box.box-warning {
    border-top-color: var(--main-color);
}

.box.box-danger {
    border-top-color: var(--main-color);
}

/* ========================================================= 
   WORLD-CLASS UI CUSTOMIZATIONS (Header, Sidebar & Boxes)
   ========================================================= */

/* Override AdminLTE Header Colors */
.skin-purple .main-header .navbar {
    background-color: var(--brand-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.skin-purple .main-header .logo {
    background-color: var(--brand-primary-dark);
    color: #ffffff;
    font-family: 'Colonna MT', 'Source Sans Pro', sans-serif;
    letter-spacing: 1px;
}

    .skin-purple .main-header .logo:hover {
        background-color: var(--brand-primary);
    }

.skin-purple .main-header .navbar .sidebar-toggle:hover {
    background-color: var(--brand-primary-dark);
}

/* Override AdminLTE Sidebar Colors */
.skin-purple .wrapper, .skin-purple .main-sidebar, .skin-purple .left-side {
    background-color: var(--sidebar-bg);
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}

.skin-purple .sidebar-menu > li > a {
    padding: 12px 15px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.skin-purple .sidebar-menu > li:hover > a,
.skin-purple .sidebar-menu > li.active > a {
    background-color: var(--sidebar-hover);
    border-left-color: var(--brand-primary);
}

.skin-purple .sidebar-menu > li.header {
    background-color: #141a1f;
    color: #6c7c8c;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Modernized Box Styling (To be used in your Create/Index views) */
.box.box-premium {
    border-top: none;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin-top: 15px;
    border: 1px solid #eef0f3;
}

.box-header.premium-header {
    background-color: #fff;
    color: #333;
    border-bottom: 1px solid #f0f2f5;
    padding: 18px 25px;
    border-radius: 8px 8px 0 0;
}

.premium-header .box-title {
    font-weight: 600;
    font-size: 18px;
    color: var(--brand-primary);
}

/* ========================================================= 
   LOADING RING ANIMATION (Your Custom CSS)
   ========================================================= */
.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: transparent;
    border: 3px solid #3c3c3c;
    border-radius: 50%;
    text-align: center;
    line-height: 150px;
    font-family: sans-serif;
    font-size: 20px;
    color: var(--main-color);
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--main-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, .5);
    font-weight: bold;
}

    .ring:before {
        content: '';
        position: absolute;
        top: -3px;
        left: -3px;
        width: 155px;
        height: 155px;
        border: 3px solid transparent;
        border-top: 3px solid var(--main-color);
        border-right: 3px solid var(--main-color);
        border-radius: 50%;
        animation: animateCircle 2s linear infinite;
    }

#loadingSpan {
    display: block;
    position: absolute;
    top: calc(50% - 2px);
    left: 50%;
    width: 50%;
    height: 4px;
    background: transparent;
    transform-origin: left;
    animation: animate 2s linear infinite;
}

    #loadingSpan:before {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--main-color);
        top: -6px;
        right: -8px;
        box-shadow: 0 0 20px var(--main-color);
    }

@keyframes animateCircle {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes animate {
    0% {
        transform: rotate(45deg);
    }

    100% {
        transform: rotate(405deg);
    }
}


/* ========================================================= 
   WORLD-CLASS UI CUSTOMIZATIONS (Form Controls & Buttons)
   ========================================================= */

/* Box Header Enhancement */
.premium-header {
    border-left: 5px solid var(--brand-primary);
    background: linear-gradient(to right, #ffffff, #f8f9fc);
}

/* Input Addon (Icon) Enhancements */
.input-group-addon {
    background-color: #f4f5fa; /* Very soft tint of your brand color */
    color: var(--brand-primary); /* Colored icons instead of gray */
    border-color: #d2d6de;
    transition: all 0.3s;
}

/* Glowing Inputs on Focus */
.form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 8px rgba(88, 86, 214, 0.25);
}

    .form-control:focus + .input-group-addon,
    .input-group:focus-within .input-group-addon {
        background-color: var(--brand-primary);
        color: white;
        border-color: var(--brand-primary);
    }

/* Soft Gradient Box for Settings */
.premium-setting-box {
    background: linear-gradient(135deg, #f8f9fc 0%, #edf1f7 100%);
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

/* Tax Highlight Boxes */
.tax-box-material {
    background: #fff;
    border-left: 4px solid #10b981; /* Emerald Green */
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.tax-box-royalty {
    background: #fff;
    border-left: 4px solid #f59e0b; /* Amber/Orange */
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

/* Premium Button Styles */
.btn-premium-save {
    background-color: var(--brand-primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 25px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(88, 86, 214, 0.3);
    transition: all 0.2s ease;
}

    .btn-premium-save:hover {
        background-color: var(--brand-primary-dark);
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 6px 15px rgba(88, 86, 214, 0.4);
    }

    .btn-premium-save:active {
        transform: translateY(1px);
        box-shadow: 0 2px 5px rgba(88, 86, 214, 0.3);
    }

.btn-premium-clear {
    background-color: #fff;
    color: #6c757d;
    border: 1px solid #d2d6de;
    border-radius: 6px;
    padding: 8px 20px;
    font-weight: 600;
    transition: all 0.2s;
}

    .btn-premium-clear:hover {
        background-color: #f8f9fa;
        color: var(--brand-primary);
        border-color: #c0c4cc;
    }

/* DataTables & Dropdown Overrides */
.dataTables_filter, .dataTables_info {
    display: none;
}

.dropdown-menu li > a:hover, .dropdown-menu li > a:focus, .dropdown-submenu:hover > a {
    background-color: #222d32;
    color: white;
}

/* ========================================================= 
   PREMIUM GROUP CARD STYLING (For World-Class Data Entry)
   ========================================================= */
.premium-group-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    border: 1px solid #eef0f3;
    overflow: hidden;
}

.premium-group-header {
    background: #f8f9fc;
    padding: 15px 25px;
    border-bottom: 1px solid #eef0f3;
    display: flex;
    align-items: center;
}

    /* Made header text Pure Black for maximum contrast */
    .premium-group-header h4 {
        margin: 0;
        color: #000000;
        font-size: 15px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

.premium-group-icon {
    background: var(--brand-primary);
    color: white;
    height: 32px;
    width: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(88, 86, 214, 0.4);
}

.premium-group-body {
    padding: 25px;
}

/* Global Form Control Enhancements - Maximum Readability */
.form-group label {
    color: #111111; /* Deep Black to prevent eye strain */
    font-weight: 700;
    font-size: 13.5px;
    margin-bottom: 8px;
}

/* Make input text crisp and dark */
.form-control {
    color: #111111;
    font-weight: 500;
}

.input-group-addon {
    background-color: #f4f5fa;
    color: var(--brand-primary);
    border-color: #d2d6de;
}

.form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(88, 86, 214, 0.1);
}

/* Main Box Header & Footer Overrides */
.main-box-header-premium {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #3b3998 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 8px 8px 0 0;
}

.main-box-footer-premium {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* ========================================================= 
   PREMIUM UI OVERRIDES FOR USER HEADER DROPDOWN
   ========================================================= */
#centerMenuUl a {
    color: white;
}

.navbar-nav > .user-menu > .dropdown-menu > .user-header {
    /* Matches the Premium Box Header Gradient */
    background: linear-gradient(135deg, var(--brand-primary, #5856d6) 0%, #3b3998 100%) !important;
}

    /* Ensures text is completely white against the new dark gradient */
    .navbar-nav > .user-menu > .dropdown-menu > .user-header > p,
    .navbar-nav > .user-menu > .dropdown-menu > .user-header > p > small {
        color: #ffffff !important;
    }

.navbar-nav > .user-menu > .dropdown-menu > .user-footer {
    background-color: #f8f9fa !important;
    border-top: 1px solid #e2e8f0;
}

    .navbar-nav > .user-menu > .dropdown-menu > .user-footer .btn-default {
        color: #6c757d;
        border: 1px solid #d2d6de;
        border-radius: 6px;
        font-weight: 600;
        transition: all 0.2s;
    }

        .navbar-nav > .user-menu > .dropdown-menu > .user-footer .btn-default:hover {
            background-color: #e2e8f0;
            color: var(--brand-primary, #5856d6);
        }

/* ========================================================= 
   FIX FOR CONTROL SIDEBAR BACKGROUND HEIGHT ISSUE
   ========================================================= */
.control-sidebar-bg {
    position: fixed !important;
    height: 100vh !important; /* Forces it to always take full screen height */
    top: 0 !important;
    bottom: 0 !important;
}
