/* =====================================================
   SAMS - Stores and Assets Management System
   Main Stylesheet
   ===================================================== */

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-active: #3498db;
    --primary: #3498db;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #2980b9;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --body-bg: #f0f2f5;
    --top-nav-height: 56px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--body-bg);
    overflow-x: hidden;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    font-size: 18px;
    margin-bottom: 2px;
    color: #fff;
}

.sidebar-header small {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

.sidebar-header .sidebar-subtitle {
    font-size: 11px;
    color: rgba(255,255,255,0.7) !important;
}

.sidebar-nav {
    list-style: none;
    padding: 10px 0;
}

.sidebar-nav li a {
    display: block;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li.active a {
    background: rgba(255,255,255,0.1);
    border-left-color: var(--sidebar-active);
    color: #fff;
}

.sidebar-nav li a i {
    width: 24px;
    margin-right: 10px;
    text-align: center;
}

/* ===== Main Content ===== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ===== Top Navbar ===== */
.top-navbar {
    height: var(--top-nav-height);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.sidebar-toggle {
    font-size: 20px;
    color: var(--dark);
    text-decoration: none;
}

.page-title {
    font-size: 16px;
    color: var(--dark);
}

.notification-bell {
    font-size: 18px;
    color: #555;
    text-decoration: none;
}

.notification-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    white-space: normal;
}

.notification-item.unread {
    background: #f0f7ff;
}

.user-menu {
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
}

/* ===== Dashboard Cards ===== */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--primary);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    font-size: 36px;
    opacity: 0.3;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.stat-card .stat-label {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
}

.stat-card.border-success { border-left-color: var(--success); }
.stat-card.border-warning { border-left-color: var(--warning); }
.stat-card.border-danger { border-left-color: var(--danger); }
.stat-card.border-info { border-left-color: var(--info); }

/* ===== Cards & Panels ===== */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* ===== Tables ===== */
.table th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: #555;
    border-top: none;
}

.table-dark,
.table-dark th {
    background-color: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

.table td {
    vertical-align: middle;
    font-size: 14px;
}

/* ===== Badges ===== */
.badge {
    font-weight: 500;
    font-size: 12px;
    padding: 5px 10px;
}

/* ===== Forms ===== */
.form-label {
    font-weight: 600;
    font-size: 13px;
    color: #555;
}

.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 8px 12px;
    font-size: 14px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
}

/* ===== Buttons ===== */
.btn {
    border-radius: 6px;
    font-size: 14px;
    padding: 8px 18px;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
}

.btn-warning {
    background: var(--warning);
    border-color: var(--warning);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}

/* ===== Action Buttons ===== */
.btn-action {
    padding: 4px 10px;
    font-size: 13px;
}

/* ===== Quick Actions ===== */
.quick-action {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.2s;
    border: 1px solid #eee;
}

.quick-action:hover {
    background: var(--light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(3px);
}

.quick-action i {
    font-size: 20px;
    margin-right: 12px;
    width: 30px;
    text-align: center;
}

/* ===== Activity Feed ===== */
.activity-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content .action {
    font-size: 13px;
    font-weight: 500;
}

.activity-content .time {
    font-size: 11px;
    color: #999;
}

/* ===== Bin Card ===== */
.bin-card-table th,
.bin-card-table td {
    text-align: center;
    font-size: 13px;
}

.bin-card-table .qty-in {
    color: var(--success);
    font-weight: 600;
}

.bin-card-table .qty-out {
    color: var(--danger);
    font-weight: 600;
}

.bin-card-table .balance {
    font-weight: 700;
    color: var(--dark);
}

/* ===== Info Table (View pages) ===== */
.info-table td:first-child {
    font-weight: 600;
    color: #555;
    width: 200px;
    background: #fafafa;
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--primary) 100%);
}

.login-card {
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-card .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-card .logo h2 {
    color: var(--dark);
    margin-bottom: 5px;
}

.login-card .logo p {
    color: #888;
    font-size: 13px;
}

/* ===== Report Cards ===== */
.report-card {
    cursor: pointer;
    transition: all 0.2s;
}

.report-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.report-card .card-body {
    text-align: center;
    padding: 25px;
}

.report-card i {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary);
}

/* ===== Settings Items ===== */
.settings-card {
    transition: all 0.2s;
    cursor: pointer;
}

.settings-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stat-card .stat-value {
        font-size: 22px;
    }
    
    .info-table td:first-child {
        width: 120px;
    }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

/* ===== Print ===== */
@media print {
    .sidebar, .top-navbar, .btn, .no-print {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
}
