/* Promethean Stores — Custom Styles */

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #3b82f6;
    --header-height: 56px;
}

/* Layout */
body {
    min-height: 100vh;
    background-color: #f8fafc;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background-color: var(--sidebar-bg);
    color: #cbd5e1;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar .brand {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar .nav-link {
    color: #cbd5e1;
    padding: 0.6rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: background-color 0.15s, border-color 0.15s;
}

.sidebar .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
}

.sidebar .nav-link.active {
    background-color: var(--sidebar-hover);
    color: #fff;
    border-left-color: var(--sidebar-active);
    font-weight: 500;
}

.sidebar .nav-label {
    padding: 1rem 1.25rem 0.4rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 600;
}

.sidebar .nav-submenu .nav-link {
    padding-left: 2.5rem;
    font-size: 0.85rem;
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top header */
.top-header {
    height: var(--header-height);
    background-color: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.top-header .user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Content area */
.content-area {
    padding: 1.5rem;
    flex: 1;
}

/* Page header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.page-header .breadcrumb {
    font-size: 0.85rem;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.stat-card .card-body {
    padding: 1.25rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
}

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

/* Tables */
.table-container {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.table-container .table {
    margin-bottom: 0;
}

.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
    border-bottom-width: 1px;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Status badges */
.badge-draft { background-color: #94a3b8; }
.badge-posted { background-color: #22c55e; }
.badge-approved { background-color: #3b82f6; }
.badge-cancelled { background-color: #ef4444; }
.badge-failed { background-color: #ef4444; }
.badge-open { background-color: #f59e0b; }
.badge-active { background-color: #22c55e; }

/* Filter bar */
.filter-bar {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Flash messages */
.flash-container {
    position: fixed;
    top: calc(var(--header-height) + 0.5rem);
    right: 1.5rem;
    z-index: 1050;
    max-width: 400px;
}

.flash-container .alert {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.login-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-card h2 {
    font-weight: 700;
    color: #1e293b;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #fff;
    color: #334155;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.15s, border-color 0.15s;
}

.btn-google:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}

/* Sidebar toggle button (mobile) */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #475569;
    cursor: pointer;
}

@media (max-width: 991.98px) {
    .sidebar-toggle {
        display: inline-flex;
    }
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
}

.sidebar-overlay.show {
    display: block;
}

/* Pagination */
.pagination-wrapper {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pagination-wrapper .pagination-info {
    font-size: 0.85rem;
    color: #64748b;
}

/* Numeric values — right align */
.text-right {
    text-align: right !important;
}

/* Footer */
.main-footer {
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}
