/* dashboard/style.css - Styles matching the user's screenshot */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600;700&display=swap');

:root {
    --sidebar-bg: #2e353d;
    --sidebar-hover: #23282d;
    --sidebar-active: #007bff;
    --header-bg: #f8f9fa;
    --body-bg: #f1f3f6;
    --text-dark: #333333;
    --text-light: #ffffff;
    --text-muted: #888888;
    
    /* Stats Colors */
    --color-teal: #17a2b8;
    --color-green: #28a745;
    --color-blue: #007bff;
    --color-red: #dc3545;
    
    --font-family: 'Source Sans Pro', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--body-bg);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--text-light);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.sidebar-brand {
    padding: 18px 20px;
    border-bottom: 1px solid #3c454e;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand svg {
    color: #e83e8c;
}

.sidebar-user {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #3c454e;
}

.sidebar-user img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #fff;
}

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

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
    flex-grow: 1;
}

.menu-header {
    padding: 15px 20px 5px;
    font-size: 11px;
    font-weight: 700;
    color: #727f8c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: #c2c6ca;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover {
    background-color: var(--sidebar-hover);
    color: var(--text-light);
}

.sidebar-menu li.active a {
    background-color: var(--sidebar-active);
    color: var(--text-light);
    border-left: 3px solid #fff;
}

.menu-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-item-left svg {
    width: 16px;
    height: 16px;
}

.menu-arrow {
    font-size: 10px;
}

/* Header bar */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

header.dashboard-header {
    height: 55px;
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
}

.nav-home-link {
    text-decoration: none;
    color: #495057;
    font-size: 14px;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar input {
    background-color: #f1f3f5;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 5px 30px 5px 10px;
    font-size: 13px;
    width: 200px;
    outline: none;
}

.search-bar svg {
    position: absolute;
    right: 10px;
    color: #6c757d;
    width: 14px;
    height: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.noti-bell {
    position: relative;
    cursor: pointer;
    color: #495057;
}

.noti-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    background-color: #ffc107;
    color: #000;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-icon {
    color: #495057;
    cursor: pointer;
}

/* Page Body Layout */
.content-wrapper {
    padding: 20px;
    flex-grow: 1;
}

.page-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}

.page-title {
    font-size: 26px;
    font-weight: 400;
}

.breadcrumb {
    font-size: 13px;
    color: #6c757d;
}

.breadcrumb a {
    text-decoration: none;
    color: #007bff;
}

/* Dashboard Statistics Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stats-card {
    border-radius: 4px;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.stats-card.teal { background-color: var(--color-teal); }
.stats-card.green { background-color: var(--color-green); }
.stats-card.blue { background-color: var(--color-blue); }
.stats-card.red { background-color: var(--color-red); }

.stats-card-body {
    padding: 15px;
    position: relative;
    flex-grow: 1;
}

.stats-number {
    font-size: 38px;
    font-weight: 700;
}

.stats-label {
    font-size: 14px;
    opacity: 0.9;
}

.stats-icon-bg {
    position: absolute;
    right: 15px;
    top: 15px;
    opacity: 0.15;
    color: #fff;
}

.stats-card-footer {
    background-color: rgba(0,0,0,0.1);
    padding: 8px 15px;
    font-size: 12px;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s;
}

.stats-card-footer:hover {
    background-color: rgba(0,0,0,0.2);
    color: #fff;
}

/* Panel Containers */
.panel {
    background-color: #ffffff;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    font-weight: 600;
}

.panel-body {
    padding: 20px;
}

/* Data Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    font-size: 14px;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

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

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge.pending { background-color: #ffeeba; color: #856404; }
.badge.accepted, .badge.paid { background-color: #d4edda; color: #155724; }
.badge.rejected, .badge.unpaid, .badge.overdue { background-color: #f8d7da; color: #721c24; }

/* Dashboard forms */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--sidebar-active);
}

label.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--sidebar-active);
    color: #fff;
}
.btn-primary:hover { background-color: #0069d9; }

.btn-success {
    background-color: var(--color-green);
    color: #fff;
}
.btn-success:hover { background-color: #218838; }

.btn-danger {
    background-color: var(--color-red);
    color: #fff;
}
.btn-danger:hover { background-color: #c82333; }

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}
.btn-secondary:hover { background-color: #5a6268; }

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

/* Tabs for Accounting page */
.tab-container {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}

.tab-btn.active {
    color: var(--sidebar-active);
    border-bottom: 2px solid var(--sidebar-active);
}

/* Live Notifications Panel */
.noti-panel {
    position: absolute;
    top: 50px;
    right: 20px;
    width: 320px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
}

.noti-panel-header {
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    font-size: 14px;
    background-color: #f8f9fa;
}

.noti-list {
    max-height: 250px;
    overflow-y: auto;
    list-style: none;
}

.noti-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f1f3f5;
    font-size: 13px;
}

.noti-item:hover {
    background-color: #f8f9fa;
}

.noti-item a {
    text-decoration: none;
    color: var(--text-dark);
}

.noti-item-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Login/Register Card layout */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, #1e2227 100%);
}

.auth-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    padding: 30px;
}

.auth-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}
