/* StockNow — Custom Styles */

:root {
    --sn-primary: #2c5282;
    --sn-sidebar: #1a202c;
    --sn-accent: #3182ce;
}

/* Sidebar */
#sidebar-wrapper {
    transition: margin-left 0.25s ease-out;
}

#sidebar-wrapper .list-group-item {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    border-color: rgba(255,255,255,0.05) !important;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: rgba(255,255,255,0.08) !important;
}

#sidebar-wrapper .list-group-item.active {
    background-color: var(--sn-primary) !important;
    border-color: var(--sn-primary) !important;
}

/* Collapsed sidebar */
#wrapper.toggled #sidebar-wrapper {
    margin-left: -230px;
}

/* Cards */
.card-stat {
    border-left: 4px solid var(--sn-primary);
    transition: transform 0.15s ease;
}

.card-stat:hover {
    transform: translateY(-2px);
}

.card-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sn-primary);
}

.card-stat .stat-label {
    font-size: 0.8rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Status badge improvements */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
}

/* Table tweaks */
.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4a5568;
    font-weight: 600;
}

.table td {
    vertical-align: middle;
}

/* Form sections */
.form-section {
    background: #f7fafc;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.form-section h6 {
    color: var(--sn-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Margin indicators */
.margin-good { color: #38a169; font-weight: 600; }
.margin-warn { color: #d69e2e; font-weight: 600; }
.margin-bad { color: #e53e3e; font-weight: 600; }

/* Login page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a202c 0%, #2c5282 100%);
}

.login-card {
    max-width: 400px;
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Action buttons group */
.btn-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -230px;
    }
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
    .container-fluid {
        padding: 1rem !important;
    }
}

/* Shipment photo tiles */
.photo-tile {
    transition: border-color 0.15s;
}

.photo-tile:hover {
    border-color: var(--sn-accent) !important;
}

.photo-actions {
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
}

.photo-tile:hover .photo-actions,
.photo-tile:focus-within .photo-actions {
    opacity: 1;
    pointer-events: auto;
}

/* On touch devices (mobile), always show actions */
@media (hover: none) {
    .photo-actions {
        opacity: 1;
        pointer-events: auto;
    }
}

.photo-actions .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
    line-height: 1;
}

/* Table column filters */
.table-filters th {
    padding: 0.35rem 0.5rem !important;
    background: #f8f9fa;
}

.table-filters input,
.table-filters select {
    font-size: 0.78rem;
    border-color: #dee2e6;
}

.table-filters input:focus,
.table-filters select:focus {
    border-color: var(--sn-accent);
    box-shadow: 0 0 0 0.15rem rgba(49, 130, 206, 0.15);
}

/* Print styles */
@media print {
    #sidebar-wrapper, .navbar, .btn-actions, .pagination {
        display: none !important;
    }
    #page-content-wrapper {
        margin-left: 0 !important;
    }
}
