/* modern_redesign.css */
/* Global typography */
body {
    font-family: 'Outfit', sans-serif;
    background-color: #f0f2f5;
    color: #333;
}
/* Top navbar - the nav inside #top is the fixed element (via Bootstrap's navbar-fixed-top) */
#top {
    /* structural wrapper only - nav handles fixed positioning */
}
#top .navbar.navbar-inverse.navbar-fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1050;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: none;
    margin-bottom: 0;
}
/* Hide original header spacing adjustments */
body.padTop53 { padding-top: 60px !important; }
/* Sidebar styling */
#left {
    position: fixed;
    top: 60px;
    left: 0;
    width: 260px;
    height: calc(100% - 60px);
    background: linear-gradient(135deg, #1e1e2f, #2c3e50);
    color: #e0e0e0;
    overflow-y: auto;
    transition: left 0.3s ease;
    padding-top: 20px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    z-index: 1040;
}
/* Sidebar collapsed state - slide off screen */
.toggled #left {
    left: -260px;
}
/* Sidebar links */
#left a {
    color: #e0e0e0;
    text-decoration: none;
    display: block;
    padding: 8px 20px;
    transition: background 0.2s ease, color 0.2s ease;
}
#left a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
/* User media card */
#left .user-media {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 8px;
    margin: 0 20px 20px;
    text-align: center;
}
#left .user-media img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #fff;
    margin-bottom: 10px;
}
#left .user-media .media-heading {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}
/* Sidebar widgets */
#left .sidebar-widget {
    background: rgba(255,255,255,0.05);
    margin: 0 20px 15px;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.9rem;
}
/* Collapse menu styling */
#menu .panel a {
    font-size: 1.125rem;
    padding: 10px 10px;
}
#menu .panel .collapse a {
    padding-left: 25px;
}
/* Sidebar dropdown/submenu items - white background for visibility */
#menu ul {
    background: #ffffff;
    border-radius: 4px;
    margin: 2px 10px;
}
/* Username in sidebar */
.media-heading {
    color: #fff !important;
}
#menu ul a {
    color: #333333 !important;
    font-size: 17px;
    padding: 10px 12px;
}
#menu ul a:hover {
    background: #e8e8e8;
    color: #000;
}
/* Toggle button */
#menu-toggle {
    cursor: pointer;
    color: #fff !important;
    font-size: 1.4rem;
    margin-right: 15px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    padding: 6px 10px;
    z-index: 2200;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
    flex-shrink: 0;
}
#menu-toggle:hover {
    background: rgba(255,255,255,0.25);
}
/* Navbar header/brand */
#top .navbar-header {
    display: flex;
    align-items: center;
    float: none;
}
#top .navbar-brand {
    padding: 0;
    height: auto;
    float: none;
}
#top .navbar-brand .comhad {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1;
    text-shadow: none;
}
/* Navbar right links */
#top .nav.navbar-top-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    list-style: none;
    margin-bottom: 0;
    padding-left: 0;
}
#top .nav.navbar-top-links > li {
    display: inline-block;
}
#top .nav.navbar-top-links > li > a {
    background-color: transparent !important;
}
/* Content area - adjust for sidebar width */
#content {
    margin-left: 260px;
    transition: margin-left 0.3s ease;
    padding: 15px;
    min-height: calc(100vh - 60px);
}
/* When sidebar is toggled (hidden), expand content */
.toggled #content {
    margin-left: 0;
}
/* Override main.css content margin at larger breakpoints */
@media (min-width: 768px) {
    #content {
        margin-left: 260px;
    }
}
@media (min-width: 992px) {
    #content {
        margin-left: 260px;
    }
}
/* Responsive adjustments */
@media (max-width: 768px) {
    #left {
        left: -260px;
        box-shadow: 4px 0 12px rgba(0,0,0,0.3);
    }
    .toggled #left {
        left: 0;
    }
    /* Show sidebar menu items when sidebar is open on mobile */
    #menu.collapse {
        display: none;
    }
    .toggled #menu.collapse {
        display: block !important;
    }
    #top .navbar.navbar-inverse.navbar-fixed-top {
        padding: 0 10px;
    }
    #content {
        margin-left: 0;
        padding: 10px;
    }
    .toggled #content {
        margin-left: 0;
    }
    .toggled #wrap {
        overflow: hidden;
    }
}
/* ===== Form Layout Fixes ===== */
/* Fix .inner class padding that creates extra left space and causes right overflow */
.inner {
    padding-left: 0;
    padding-right: 0;
    min-height: 0;
}
.inner .row {
    margin-left: 0;
    margin-right: 0;
}
/* Fix first row inside panel - remove negative margins so content respects panel borders */
.panel-default > .panel-heading + .row,
.panel-default > .panel-heading + form > .row {
    margin-left: 0;
    margin-right: 0;
}
/* Fix col-form-label for Bootstrap 3 (was BS4) - left align labels */
.col-form-label {
    padding-top: 6px;
    margin-bottom: 0;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    white-space: nowrap;
}
/* BS4 utility class polyfills for BS3 */
.pt-2 { padding-top: 10px; }
.ml-2 { margin-left: 10px; }
.mr-2 { margin-right: 10px; }
.mt-3 { margin-top: 15px; }
.mb-5 { margin-bottom: 30px; }
.text-nowrap { white-space: nowrap; }
.font-weight-bold { font-weight: bold; }
/* Fix nested form group labels - compact horizontal layout */
#content .form-group.row {
    margin-left: 0;
    margin-right: 0;
}
#content .form-group.row > [class*="col-"] {
    padding-left: 4px;
    padding-right: 4px;
}
#content .form-group.row .col-form-label {
    padding-left: 0;
    padding-right: 4px;
    line-height: 1.3;
}
/* ===== UNIFIED FORM CONTROL SIZING ===== */
/* Force ALL form controls to consistent size */
#content .form-control,
#content input[type="text"],
#content input[type="number"],
#content input[type="date"],
#content input[type="email"],
#content select,
#content textarea {
    font-size: 13px !important;
    height: 30px !important;
    padding: 3px 8px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
}
#content textarea {
    height: auto !important;
    min-height: 60px;
    padding: 6px 8px !important;
}
/* Override any custom classes from Style1.css that use vw sizing */
#content .sadlin,
#content .slint,
#content .slin2t,
#content .dodlin,
#content .salin,
#content .docin,
#content .sadld,
#content .dodld,
#content .sadlinpmark {
    width: 100% !important;
    height: 30px !important;
    font-size: 13px !important;
    font-family: inherit !important;
    float: none !important;
    margin: 0 !important;
    padding: 3px 8px !important;
    line-height: 1.4 !important;
    color: #555 !important;
    background-color: #fff !important;
    background-image: none !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
}
/* Select elements need -webkit-appearance reset for consistent height */
#content select,
#content select.form-control,
#content select.dodlin,
#content select.sadlin {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 20px !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 8px 10px;
}
/* Fix label classes */
#content .sald,
#content .docd {
    width: auto !important;
    float: none !important;
    font-size: 13px !important;
    font-family: inherit !important;
    margin: 0 !important;
    padding: 6px 0 !important;
    height: auto !important;
    font-weight: 500 !important;
}
/* Fix checkbox styling */
#content .docheck {
    width: 16px !important;
    height: 16px !important;
    margin: 6px 0 0 0 !important;
    padding: 0 !important;
    float: none !important;
}
/* Fix dimension weight hidden section */
#content #dimweight {
    border: 1px solid #ddd !important;
    padding: 15px !important;
    border-radius: 4px !important;
    margin-bottom: 15px !important;
    background: #fafafa !important;
}
/* Fix the Total/CGST/SGST/IGST section inputs */
#content .slint {
    width: 100% !important;
    float: none !important;
}
#content .slin2t {
    width: 100% !important;
    float: none !important;
}
/* Fix inline button group sizing */
#content .input-group .form-control {
    height: 30px;
}
#content .input-group-addon {
    padding: 4px 8px;
    font-size: 13px;
}
/* Fix button sizes */
#content .btn {
    font-size: 13px;
    padding: 5px 12px;
    line-height: 1.4;
}
#content .btn-sm {
    font-size: 12px;
    padding: 4px 10px;
}
/* Ensure button columns don't add extra spacing */
#content .panel-default .col-sm-1,
#content .panel-default .col-sm-4 {
    padding-left: 8px;
    padding-right: 8px;
}
/* Table container fix: gives same sidebar clearance as #content in case edit-form echo closed #content early */
#tableContainer {
    margin-left: 0 !important;
}
#tableContainer.edit-mode {
    margin-left: 260px !important;
}
.toggled #tableContainer.edit-mode {
    margin-left: 0 !important;
}
/* Ensure the DataTable stays within content area */
#content .table-responsive {
    overflow-x: auto;
    width: 100%;
}
#dataTables-example {
    width: 100% !important;
}
#dataTables-example_wrapper {
    width: 100%;
    overflow: hidden;
}
/* ===== Docket List Table Fixes ===== */
/* Table header styling (dktth only had print CSS) */
#dataTables-example thead th.dktth {
    background-color: #2c3e50;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 6px;
    text-align: left;
    white-space: nowrap;
    border: 1px solid #1a252f;
}
#dataTables-example thead th.dktth.col1 { width: 10%; }
#dataTables-example thead th.dktth.col2 { width: 12%; }
#dataTables-example thead th.dktth.col3 { width: 14%; }
#dataTables-example thead th.dktth.col4 { width: 14%; }
#dataTables-example thead th.dktth.col5 { width: 8%; }
#dataTables-example thead th.dktth.col8 { width: 10%; }
#dataTables-example thead th.dktth.col11 { width: 12%; }
#dataTables-example thead th.dktth.col15 { width: 10%; }
/* Table body cells */
#dataTables-example tbody td {
    font-size: 13px;
    padding: 6px;
    vertical-align: middle;
}
/* Table responsive wrapper */
#dataTables-example_wrapper {
    font-size: 13px;
}
/* DataTables filter and length controls */
#dataTables-example_filter input,
#dataTables-example_length select {
    height: 30px;
    font-size: 13px;
    padding: 3px 8px;
}
/* Remove the extra </form> spacing issue - ensure proper div closing */
#content .panel-default + .panel-default {
    margin-top: 15px;
}
/* Responsive table fix */
.table-responsive {
    overflow-x: auto;
}
/* Fix button columns that are outside a .row */
#content .panel-default .col-sm-1,
#content .panel-default .col-sm-2,
#content .panel-default .col-sm-3,
#content .panel-default .col-sm-4,
#content .panel-default .col-sm-5,
#content .panel-default .col-sm-6 {
    float: left;
    position: relative;
    min-height: 1px;
    padding-left: 15px;
    padding-right: 15px;
}
#content .panel-default .col-sm-1 { width: 8.33333333%; }
#content .panel-default .col-sm-2 { width: 16.66666667%; }
#content .panel-default .col-sm-3 { width: 25%; }
#content .panel-default .col-sm-4 { width: 33.33333333%; }
#content .panel-default .col-sm-5 { width: 41.66666667%; }
#content .panel-default .col-sm-6 { width: 50%; }
/* Fix dropdown menus in form */
#content .panel-default .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    float: left;
    min-width: 160px;
    padding: 5px 0;
    margin: 2px 0 0;
    font-size: 14px;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ccc;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 4px;
    box-shadow: 0 6px 12px rgba(0,0,0,.175);
}
/* Clearfix for button row */
#content .panel-default .col-sm-1::after,
#content .panel-default .col-sm-4::after {
    display: table;
    content: " ";
    clear: both;
}
