/* XNParts Admin - Custom Material & AdminLTE v2.4.2 Overrides */

body {
    font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Login Page */
.xn-login-page {
    background-color: #d2d6de;
    min-height: 100vh;
}
.xn-login-box {
    width: 460px;
    max-width: 94%;
    margin: 5% auto;
}
.xn-login-card {
    padding: 28px 32px 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    border-radius: 2px;
}
.xn-login-card .login-box-msg {
    font-size: 16px;
    color: #555;
    padding-bottom: 20px;
}
.xn-login-card .form-control {
    height: 40px;
    border-radius: 0;
}
.xn-login-card .form-control-feedback {
    line-height: 40px;
    color: #777;
}
.xn-btn-login {
    background-color: #3c8dbc;
    border-color: #367fa9;
    padding: 8px 16px;
    font-size: 15px;
}
.xn-btn-login:hover {
    background-color: #367fa9;
}

/* Top Navbar Custom Actions */
.main-header .logo-mini img {
    max-width: 32px;
    max-height: 32px;
    vertical-align: middle;
}
.navbar-custom-menu .nav.navbar-nav > li > button,
.navbar-custom-menu .nav.navbar-nav > li > a {
    background: transparent;
    border: 0;
    color: #fff;
    padding: 15px;
    line-height: 20px;
    display: inline-block;
    font-size: 14px;
    cursor: pointer;
}
.navbar-custom-menu .nav.navbar-nav > li > button:hover,
.navbar-custom-menu .nav.navbar-nav > li > a:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #fff;
    text-decoration: none;
}

/* Floating Blue Box Title & Custom Material Form */
.custom-form h1,
.xn-page-title {
    margin: 10px 0 24px;
    text-align: center;
    color: #a1a1a1;
    font-size: 30px;
    font-weight: 400;
}
.custom-form .box.box-solid,
.xn-card.box.box-solid {
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    margin-top: 26px;
    margin-bottom: 32px;
    padding: 0 15px 15px;
    overflow: visible;
}
.box-custom-title {
    width: auto;
    float: left;
    padding: 14px 16px;
    background-color: #3c8dbc;
    margin: -20px 0 20px 10px;
    color: #fff;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 400;
    box-shadow: 0 4px 10px rgba(60, 141, 188, 0.35);
}
.custom-form .box-body,
.xn-card .box-body {
    clear: both;
    padding-top: 8px;
}

/* Underline-Only Inputs */
.custom-form .box input[type="text"],
.custom-form .box input[type="number"],
.custom-form .box input[type="email"],
.custom-form .box input[type="password"],
.custom-form .box input[type="date"],
.custom-form .box select.native,
.custom-form .box textarea.underline-input {
    border-top: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 1px solid #d2d6de;
    border-radius: 0;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
    background: transparent;
}
.custom-form .box input:focus,
.custom-form .box select.native:focus,
.custom-form .box textarea.underline-input:focus {
    border-bottom-color: #3c8dbc;
    box-shadow: none;
}
.custom-form .form-group {
    margin-bottom: 26px;
}
.custom-form .box label {
    font-weight: 400;
    color: #333;
    font-size: 13px;
}
.xn-quick-add-btn {
    color: #3c8dbc;
    margin-left: 5px;
    cursor: pointer;
    font-size: 14px;
}
.xn-quick-add-btn:hover {
    color: #204d74;
}

/* Select2 Material Underline & Blue Tag Pills */
.custom-form .select2-container--bootstrap .select2-selection,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-radius: 0 !important;
    box-shadow: none !important;
    border-top: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid #d2d6de !important;
    background: transparent !important;
    min-height: 34px;
}
.custom-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    line-height: 32px;
    color: #444;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #3c8dbc !important;
    border: 1px solid #367fa9 !important;
    padding: 2px 10px !important;
    color: #fff !important;
    margin: 4px 6px 2px 0 !important;
    border-radius: 3px !important;
    font-size: 13px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #ff2b2b !important;
    font-weight: 700;
    margin-right: 6px !important;
}
.select2-results__option[aria-selected="true"] {
    background-color: #666 !important;
    color: #fff !important;
}

/* Summernote Clean Frame */
.custom-form .note-editor.note-frame {
    border: 1px solid #e6e9ed;
    box-shadow: none;
}

/* Artigos Modern Livewire-Style Split Layout */
.artigos-split {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.artigos-filters-panel {
    width: 280px;
    min-width: 260px;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    padding: 16px;
}
.artigos-filters-panel h3 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #222;
}
.artigos-filters-panel .filter-row {
    margin-bottom: 12px;
}
.artigos-filters-panel label {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    display: block;
}
.artigos-filters-panel .form-control {
    height: 32px;
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 2px;
}
.artigos-main-panel {
    flex: 1;
    min-width: 0;
}
.artigos-topbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #0b87a8;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.filter-chip:hover,
.filter-chip:focus {
    color: #fff;
    background-color: #09728f;
    text-decoration: none;
}
.artigo-card {
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    margin-bottom: 14px;
    display: flex;
    overflow: hidden;
    border: 1px solid #e6eaee;
}
.artigo-card-img {
    width: 220px;
    min-width: 220px;
    background: #d8dee4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.artigo-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 205px;
}
.artigo-card-body {
    flex: 1;
    padding: 12px 16px;
    min-width: 0;
}
.artigo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.artigo-card-title {
    font-size: 17px;
    font-weight: 400;
    color: #222;
    margin: 0 0 2px;
}
.artigo-card-price {
    font-size: 17px;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
}
.artigo-card-supplier {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}
.artigo-meta-grid {
    display: grid;
    grid-template-columns: 45px 85px 120px 105px 55px;
    gap: 6px 10px;
    font-size: 13px;
    margin-bottom: 10px;
}
.artigo-meta-label {
    color: #777;
    font-size: 12px;
}
.artigo-meta-val {
    font-weight: 700;
    color: #222;
}
.stock-code-box {
    text-align: center;
    margin: 8px 0 10px;
}
.stock-code-label {
    font-size: 12px;
    color: #777;
    margin-bottom: 3px;
}
.stock-code-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 14px;
}
.stock-btn-minus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 3px;
    background: #dd4b39;
    color: #fff !important;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    text-decoration: none;
}
.stock-btn-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 3px;
    background: #00a65a;
    color: #fff !important;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    text-decoration: none;
}
.artigo-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid #f0f2f5;
    padding-top: 8px;
}
.artigo-flags {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    text-align: center;
}
.artigo-flag-item span {
    display: block;
    color: #666;
    margin-bottom: 2px;
}
.artigo-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}
.artigo-actions a,
.artigo-actions button {
    background: none;
    border: 0;
    padding: 2px 4px;
    cursor: pointer;
}

/* DataTables Toolbar & Column Filters */
.xn-dt-wrapper .dt-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}
.xn-dt-wrapper .dataTables_filter {
    display: none;
}
.xn-dt-wrapper thead tr.col-filters th {
    padding: 6px 8px;
    background: #fff;
}
.xn-dt-wrapper thead tr.col-filters input,
.xn-dt-wrapper thead tr.col-filters select {
    width: 100%;
    height: 30px;
    border: 1px solid #d2d6de;
    padding: 3px 6px;
    font-size: 12px;
    font-weight: 400;
}
.xn-expand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3c8dbc;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin-right: 6px;
    cursor: pointer;
}

/* Dashboard Welcome Box */
.xn-welcome-box {
    margin-top: 6px;
    border-top-width: 3px;
}
.xn-welcome-box .box-body {
    text-align: center;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #0097bc;
}

@media (max-width: 900px) {
    .artigos-split {
        flex-direction: column;
    }
    .artigos-filters-panel {
        width: 100%;
    }
    .artigo-card {
        flex-direction: column;
    }
    .artigo-card-img {
        width: 100%;
        height: 180px;
    }
    .artigo-meta-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.product-images-page h1 {
    margin: 10px 0 18px;
    text-align: center;
    color: #777;
    font-size: 28px;
    font-weight: 400;
}
.product-images-product {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 18px;
    padding: 12px 15px;
    background: #fff;
    border-left: 3px solid #3c8dbc;
}
.product-image-dropzone {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    border: 2px dashed #b8c7ce;
    color: #555;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background-color .2s;
}
.product-image-dropzone:hover,
.product-image-dropzone.is-dragging {
    border-color: #3c8dbc;
    background: #f4f9fc;
}
.product-image-dropzone .fa {
    color: #3c8dbc;
    font-size: 30px;
}
.product-image-dropzone span {
    color: #777;
    font-size: 13px;
    font-weight: 400;
}
.product-image-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.product-image-upload-status {
    min-height: 20px;
    margin: 8px 0;
    color: #555;
}
.product-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}
.product-image-card {
    overflow: hidden;
    border: 1px solid #d2d6de;
    border-radius: 3px;
    background: #fff;
}
.product-image-preview {
    position: relative;
    display: flex;
    height: 170px;
    align-items: center;
    justify-content: center;
    background: #f4f4f4;
}
.product-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.product-image-primary {
    position: absolute;
    top: 8px;
    left: 8px;
}
.product-image-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px;
}
.product-image-actions form {
    margin: 0;
}
.product-image-actions .btn[disabled] {
    cursor: not-allowed;
    opacity: .45;
}
.product-images-empty {
    margin: 8px 0;
    text-align: center;
}
@media (max-width: 600px) {
    .product-images-product {
        flex-direction: column;
    }
}
