/* Store Keeper Module Theme - Enhanced CSS */

:root {
    --primary-color: #2ec4b6;
    --primary-dark: #1a9b8e;
    --secondary-color: #ff6b6b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* ===== NAVIGATION ===== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 0;
}

.navbar-brand i {
    font-size: 24px;
}

.navbar-menu {
    display: flex;
    gap: 5px;
    flex: 1;
    margin-left: 40px;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    padding: 15px 15px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.navbar-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.navbar-menu a.active {
    background: rgba(255, 255, 255, 0.2);
    border-bottom: 3px solid white;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    background: rgba(255, 255, 255, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== SIDEBAR NAVIGATION ===== */
aside.sidebar {
    background: linear-gradient(135deg, #2ec4b6 0%, #1a9b8e 100%);
    color: white;
    padding: 30px 20px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 300px;
    overflow-y: auto;
    z-index: 900;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

aside.sidebar::-webkit-scrollbar {
    width: 6px;
}

aside.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

aside.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

aside.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

aside.sidebar .logo {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    font-size: 20px;
    font-weight: 700;
}

aside.sidebar .logo i {
    font-size: 28px;
    margin-right: 10px;
}

aside.sidebar .sidebar-nav {
    list-style: none;
}

aside.sidebar .sidebar-nav li {
    margin-bottom: 10px;
}

aside.sidebar .sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

aside.sidebar .sidebar-nav a:hover,
aside.sidebar .sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding-left: 20px;
}

aside.sidebar .sidebar-nav i {
    width: 25px;
    margin-right: 10px;
    text-align: center;
    font-size: 16px;
}

aside.sidebar .sidebar-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

aside.sidebar .sidebar-section-title {
    font-size: 12px;
    text-transform: uppercase;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Main Content Container with Sidebar */
.dashboard-container {
    display: block;
    min-height: 100vh;
    margin-left: 300px;
    transition: all 0.3s ease;
}

.main-content {
    padding: 25px 30px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #2ec4b6;
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===== RESPONSIVE DESIGN ===== */
/* Large Desktop (1441px and above) */
@media (min-width: 1441px) {
    aside.sidebar {
        width: 300px;
    }

    .dashboard-container {
        margin-left: 300px;
    }

    .main-content {
        padding: 30px 40px;
    }
}

/* Desktop & Large Tablet (1025px to 1440px) */
@media (max-width: 1440px) and (min-width: 1025px) {
    aside.sidebar {
        width: 280px;
    }

    .dashboard-container {
        margin-left: 280px;
    }

    .main-content {
        padding: 25px 30px;
    }
}

/* Tablet & Small Desktop (769px to 1024px) */
@media (max-width: 1024px) {
    aside.sidebar {
        width: 90vw;
        max-width: 320px;
        transform: translateX(-100%);
    }

    aside.sidebar.active {
        transform: translateX(0);
    }

    .hamburger {
        display: flex;
    }

    .dashboard-container {
        margin-left: 0;
    }

    .main-content {
        padding: 20px 25px;
        padding-top: 75px;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .hamburger {
        top: 12px;
        left: 12px;
    }

    .hamburger span {
        width: 22px;
        height: 2.5px;
        margin: 4px 0;
    }

    .main-content {
        padding: 15px;
        padding-top: 70px;
    }

    aside.sidebar {
        max-width: 85vw;
    }
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.page-header-content h1 {
    font-size: 32px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.page-header-content p {
    color: var(--text-secondary);
    font-size: 14px;
}

.page-actions {
    display: flex;
    gap: 10px;
}

/* ===== CARDS & GRID ===== */
.card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 18px;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 0;
}

.card-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Metric Cards */
.metric-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.metric-card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.metric-card.warning {
    border-left-color: var(--warning-color);
}

.metric-card.danger {
    border-left-color: var(--danger-color);
}

.metric-card.success {
    border-left-color: var(--success-color);
}

.metric-card.info {
    border-left-color: var(--info-color);
}

.metric-card .label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}

.metric-card .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.metric-card .trend {
    font-size: 12px;
    color: var(--success-color);
}

.metric-card .trend.down {
    color: var(--danger-color);
}

/* ===== BUTTONS ===== */
.btn, button {
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary, .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #2563eb;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-help {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== TABLES ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead {
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
}

.table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
}

.table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--bg-light);
}

.table .action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons .btn {
    padding: 6px 10px;
    font-size: 12px;
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== ALERTS ===== */
.alert {
    padding: 12px 16px;
    border-radius: 5px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background: #dbeafe;
    color: #0c4a6e;
    border: 1px solid #bfdbfe;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge.success {
    background: #d1fae5;
    color: #065f46;
}

.badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge.info {
    background: #dbeafe;
    color: #0c4a6e;
}

.badge.primary {
    background: #e0f2fe;
    color: #0c4a6e;
}

/* ===== STATUS INDICATORS ===== */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status.active {
    background: #d1fae5;
    color: #065f46;
}

.status.inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.status.pending {
    background: #fef3c7;
    color: #92400e;
}

.status.expired {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== CHARTS ===== */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 20px;
}

/* ===== UTILITIES ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-secondary);
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.p-10 {
    padding: 10px;
}

.p-20 {
    padding: 20px;
}

.hidden {
    display: none !important;
}

.d-flex {
    display: flex;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.align-items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 10px;
    }

    .navbar-menu {
        flex-wrap: wrap;
        margin-left: 0;
        width: 100%;
        margin-top: 10px;
    }

    .navbar-menu a {
        padding: 10px;
        font-size: 12px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .container {
        padding: 15px 10px;
    }

    .metric-strip {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .table {
        font-size: 12px;
    }

    .table thead th,
    .table tbody td {
        padding: 8px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ===== PRINT ===== */
@media print {
    .navbar,
    .page-actions,
    .modal,
    .btn {
        display: none;
    }

    body {
        background: white;
    }

    .card {
        page-break-inside: avoid;
    }
}
