/*!
 * Auction Platform - Unified Theme
 * Modern, clean, consistent style for both Admin & Agent backends
 */

/* ========== Global ========== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f1f5f9;
    color: #334155;
}

/* ========== Panel Cards ========== */
.panel {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    background: #fff;
    margin-bottom: 20px;
    overflow: hidden;
}

.panel-default {
    border: none;
}

.panel-default > .panel-heading {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    padding: 18px 24px;
}

.panel-default > .panel-heading + .panel-collapse > .panel-body,
.panel-default > .panel-body {
    padding: 24px;
}

.panel-intro .panel-heading {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
}

.panel-title, .panel-lead {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.panel-lead em {
    font-style: normal;
    position: relative;
    padding-left: 12px;
}

.panel-lead em::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 2px;
}

/* ========== Buttons ========== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 6px 16px;
    font-size: 13px;
    transition: all 0.2s ease;
    border-width: 1px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #2563eb;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #059669;
}

.btn-success:hover, .btn-success:focus {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #047857;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #dc2626;
}

.btn-danger:hover, .btn-danger:focus {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #b91c1c;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #d97706;
    color: #fff;
}

.btn-warning:hover, .btn-warning:focus {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border-color: #b45309;
    color: #fff;
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    border-color: #0891b2;
}

.btn-info:hover, .btn-info:focus {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    border-color: #0e7490;
}

.btn-default {
    background: #fff;
    border-color: #e2e8f0;
    color: #64748b;
}

.btn-default:hover, .btn-default:focus {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.btn-xs {
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-sm {
    padding: 5px 14px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-embossed {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-embossed:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn.disabled, .btn[disabled] {
    opacity: 0.5;
    transform: none !important;
    box-shadow: none !important;
}

/* ========== Toolbar ========== */
.toolbar {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.toolbar .btn {
    margin-right: 6px;
    margin-bottom: 4px;
}

.toolbar .btn i {
    margin-right: 4px;
}

/* ========== Tables ========== */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table-bordered {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 2px solid #e2e8f0;
    border-top: none;
    padding: 12px 16px;
}

.table-bordered > tbody > tr > td {
    border-top: 1px solid #f1f5f9;
    padding: 12px 16px;
    color: #334155;
    font-size: 13px;
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #fafbfc;
}

.table-hover > tbody > tr:hover {
    background-color: #f1f5f9;
}

.table-bordered > tbody > tr:last-child > td {
    border-bottom: none;
}

/* Bootstrap Table */
.fixed-table-container {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.bootstrap-table .table thead th .sortable {
    color: #475569;
}

.bootstrap-table .table thead th .sortable:hover {
    color: #2563eb;
}

/* ========== Forms ========== */
.form-control {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 8px 14px;
    font-size: 14px;
    color: #334155;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
    outline: none;
}

.form-control[disabled], .form-control[readonly] {
    background: #f8fafc;
    color: #94a3b8;
}

.control-label {
    color: #475569;
    font-weight: 500;
    font-size: 13px;
}

.help-block {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 6px;
}

.form-group {
    margin-bottom: 20px;
}

.input-group-addon {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
    border-radius: 0 8px 8px 0;
}

.input-group .form-control:first-child {
    border-radius: 8px 0 0 8px;
}

select.form-control, select.form-control.selectpicker {
    border-radius: 8px;
}

/* ========== Nav Tabs ========== */
.nav-tabs {
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 0;
}

.nav-tabs > li > a {
    border: none;
    border-bottom: 2px solid transparent;
    color: #64748b;
    font-weight: 500;
    font-size: 13px;
    padding: 10px 18px;
    margin-right: 4px;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
}

.nav-tabs > li > a:hover {
    background: #f1f5f9;
    color: #475569;
    border-color: transparent;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    border: none;
    border-bottom: 2px solid #2563eb;
    color: #2563eb;
    background: transparent;
    font-weight: 600;
}

/* ========== Status Badges ========== */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.status-1, .state-1 { background: #fef3c7; color: #92400e; }
.status-2, .state-2 { background: #dbeafe; color: #1e40af; }
.status-3, .state-3 { background: #d1fae5; color: #065f46; }
.status-4, .state-4 { background: #fee2e2; color: #991b1b; }
.status-5, .state-5 { background: #e0e7ff; color: #3730a3; }
.status-6 { background: #c7d2fe; color: #312e81; }
.status-7 { background: #f3f4f6; color: #4b5563; }

/* Label badges */
.label {
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
}

.label-success { background: orange; color: #F5F5F5; }
.label-danger { background: blue; color: #F5F5F5; }
.label-warning { background: grey; color: #F5F5F5; }
.label-info { background: #f1c40f; color: #F5F5F5; }
.label-primary { background: green; color: #F5F5F5; }
.label-default { background: #1d4ed8; color: #F5F5F5; }

/* ========== Stat Cards ========== */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.stat-card.success .stat-value { color: #059669; }
.stat-card.warning .stat-value { color: #d97706; }
.stat-card.info .stat-value { color: #0891b2; }
.stat-card.danger .stat-value { color: #dc2626; }
.stat-card.primary .stat-value { color: #2563eb; }

/* AdminLTE small-box unified */
.small-box {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: none;
    overflow: hidden;
}

.small-box > .inner {
    padding: 24px;
}

.small-box h3 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.small-box p {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
}

.small-box .icon {
    font-size: 60px;
    top: 15px;
    right: 20px;
    opacity: 0.15;
}

.bg-green { background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important; }
.bg-yellow { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important; }
.bg-blue { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important; }
.bg-red { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important; }
.bg-aqua { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important; }
.bg-purple { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important; }

/* ========== Detail Cards ========== */
.detail-card {
    padding: 20px;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.detail-card h5 {
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    border-left: 4px solid #2563eb;
    padding-left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-card h5 i {
    color: #3b82f6;
    font-size: 14px;
}

.detail-card .info-item {
    display: inline-block;
    margin-right: 32px;
    margin-top: 10px;
    min-width: 140px;
}

.detail-card .info-label {
    color: #94a3b8;
    font-size: 12px;
    display: block;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-card .info-value {
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

/* ========== File Preview ========== */
.file-preview-item {
    display: inline-block;
    margin: 6px 12px 6px 0;
    vertical-align: top;
}

.file-preview-item img {
    max-width: 120px;
    max-height: 120px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s ease;
}

.file-preview-item img:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59,130,246,0.15);
}

.file-preview-item .pdf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 100px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(220,38,38,0.2);
}

/* ========== Layer Popup ========== */
.layui-layer-fast,
.layui-layer {
    border-radius: 12px !important;
    overflow: hidden;
}

.layui-layer-fast .layui-layer-title,
.layui-layer-title {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    border-bottom: none !important;
    font-weight: 600 !important;
    color: #fff !important;
    font-size: 15px !important;
    height: 48px !important;
    line-height: 48px !important;
    padding: 0 20px !important;
}

.layui-layer-fast .layui-layer-title ~ .layui-layer-setwin,
.layui-layer-setwin {
    top: 0 !important;
    height: 48px !important;
}

.layui-layer-fast .layui-layer-title ~ .layui-layer-setwin > a,
.layui-layer-setwin > a {
    height: 48px !important;
    line-height: 48px !important;
}

.layui-layer-fast .layui-layer-setwin > a:after,
.layui-layer-setwin > a:after {
    color: #fff !important;
}

.layui-layer-fast .layui-layer-btn,
.layui-layer-btn {
    border-top: 1px solid #f1f5f9 !important;
    padding: 12px 20px !important;
    background: #f8fafc !important;
}

.layui-layer-fast .layui-layer-btn a,
.layui-layer-btn a {
    height: 36px !important;
    line-height: 36px !important;
    padding: 0 20px !important;
    font-size: 13px !important;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    margin-top: 0 !important;
}

.layui-layer-fast .layui-layer-btn .layui-layer-btn0,
.layui-layer-btn .layui-layer-btn0 {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border-color: #2563eb !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
}

.layui-layer-fast .layui-layer-btn .layui-layer-btn1,
.layui-layer-btn .layui-layer-btn1 {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
}

/* ========== Pagination ========== */
.pagination > li > a,
.pagination > li > span {
    border-radius: 6px;
    margin: 0 2px;
    border-color: #e2e8f0;
    color: #475569;
    font-weight: 500;
    font-size: 13px;
}

.pagination > li > a:hover,
.pagination > li > span:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #2563eb;
}

.pagination > .active > a,
.pagination > .active > span {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #2563eb;
}

.pagination > .active > a:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
}

/* ========== Dropdown ========== */
.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: 180px;
}

.dropdown-menu > li > a {
    padding: 8px 16px;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.dropdown-menu > li > a:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.dropdown-menu .divider {
    margin: 6px 0;
    background: #f1f5f9;
}

/* ========== Alerts & Tips ========== */
.alert {
    border-radius: 10px;
    border: none;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 500;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-info { background: #dbeafe; color: #1e40af; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-danger { background: #fee2e2; color: #991b1b; }

/* ========== Progress Bars ========== */
.progress {
    border-radius: 10px;
    background: #f1f5f9;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

/* ========== Widgets ========== */
.widget-box {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.widget-header {
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 12px 12px 0 0;
    padding: 14px 20px;
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ========== Agent Specific ========== */
body[style*="margin:0;padding:0;"] {
    background: #f1f5f9;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .panel-body {
        padding: 16px;
    }
    .stat-card {
        padding: 18px;
    }
    .stat-card .stat-value {
        font-size: 22px;
    }
    .detail-card .info-item {
        margin-right: 16px;
    }
}
