@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* "Dasher" Inspired Modern Clean UI */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #059669;       /* Emerald green like screenshot */
    --primary-light: #d1fae5;
    --primary-hover: #047857;
    --neutral-bg: #f8fafc;          /* Off-white workspace background */
    --surface-bg: #ffffff;
    --border-color: #f1f5f9;
    --border-strong: #e2e8f0;
    --text-main: #1e293b;           /* Slate dark */
    --text-muted: #64748b;          /* Slate muted */
    --sidebar-bg: #ffffff;          /* Pure white sidebar */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;              /* Soft rounded card corners */
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body {
    font-family: var(--font-stack);
    font-size: 13.5px;
    color: var(--text-main);
    background-color: var(--neutral-bg);
    min-height: 100vh;
    line-height: 1.5;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 99px;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* White Sidebar with Green Pill Link */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 24px 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar .logo {
    padding: 0 24px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Dasher styled header */
.sidebar .logo h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar .logo p {
    display: none; /* Hide subtitle like in Dasher */
}

.sidebar ul {
    list-style: none;
    padding: 0 16px;
}

.sidebar ul li {
    margin-bottom: 4px;
}

.menu-divider {
    padding: 18px 24px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #475569;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 13.5px;
    transition: all 0.15s ease;
}

.sidebar ul li a:hover {
    color: var(--text-main);
    background-color: #f8fafc;
}

/* Active Link styled as a light green pill */
.sidebar ul li a.active {
    color: var(--primary-color);
    background-color: var(--primary-light);
    font-weight: 600;
}

.sidebar ul li a .icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Profile Section at bottom of Sidebar like Dasher screenshot */
.sidebar-footer {
    padding: 20px 16px 0;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.user-profile-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px;
}

.user-avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 8px;
    background-color: #e2e8f0;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.user-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-profile-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-main);
}

.user-profile-role {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Clean Top Navbar with border */
.navbar {
    background-color: #ffffff;
    padding: 14px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.navbar h2 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Top Nav Search and Notification Badges like screenshot */
.navbar-search-btn {
    border: 1px solid var(--border-strong);
    background: transparent;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-action-icon {
    position: relative;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
}

.navbar-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--danger-color);
    color: white;
    font-size: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-content {
    flex: 1;
    padding: 28px;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.page-header p {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Modern Rounded Cards */
.card {
    background-color: var(--surface-bg);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px -2px rgba(0,0,0,0.03), 0 2px 4px -1px rgba(0,0,0,0.02);
    margin-bottom: 24px;
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 18px 24px;
    font-weight: 600;
    font-size: 14.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 24px;
}

/* Forms styling */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-main);
    font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: inherit;
    font-size: 13px;
    background-color: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-strong);
    padding: 9px 12px;
    border-radius: var(--radius-md);
    width: 100%;
    transition: all 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.08);
}

.form-row {
    display: flex;
    gap: 16px;
}
.form-row > * {
    flex: 1;
}

/* Modern Rounded Buttons */
.btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 8px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    text-decoration: none;
}

.btn-secondary {
    background-color: #ffffff;
    border-color: var(--border-strong);
    color: #475569;
}
.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    text-decoration: none;
}

.btn-success {
    background-color: var(--primary-color);
    color: #ffffff;
}
.btn-success:hover {
    background-color: var(--primary-hover);
    text-decoration: none;
}

.btn-danger {
    background-color: var(--danger-color);
    color: #ffffff;
}
.btn-danger:hover {
    background-color: #dc2626;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.w-100 {
    width: 100%;
}

/* Clean Tables with Light Dotted Borders */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 14px 20px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

table th {
    background-color: #ffffff;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

table tbody tr:hover {
    background-color: #fafbfc;
}

.text-right {
    text-align: right;
}

/* Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}
.status-badge.active, .status-badge.completed { background: #d1fae5; color: #065f46; }
.status-badge.inactive, .status-badge.expired { background: #fee2e2; color: #991b1b; }
.status-badge.pending { background: #fffbeb; color: #92400e; }
.status-badge.delivered, .status-badge.reviewed { background: #e0f2fe; color: #075985; }

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
}
.alert-error {
    background-color: var(--danger-light);
    border-color: #fca5a5;
    color: #991b1b;
}
.alert-success {
    background-color: var(--primary-light);
    border-color: #a7f3d0;
    color: #065f46;
}

/* Colored Metric Cards like screenshot */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--surface-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 20px -2px rgba(0,0,0,0.02), 0 2px 4px -1px rgba(0,0,0,0.01);
    position: relative;
}

/* Metric Colors */
.stat-card:nth-child(4n+1) { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); } /* Green */
.stat-card:nth-child(4n+2) { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); } /* Blue */
.stat-card:nth-child(4n+3) { background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%); } /* Red/Pink */
.stat-card:nth-child(4n+4) { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); } /* Amber */

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Icon backgrounds matching gradients */
.stat-card:nth-child(4n+1) .stat-card-icon { background: #bbf7d0; color: #166534; }
.stat-card:nth-child(4n+2) .stat-card-icon { background: #bae6fd; color: #075985; }
.stat-card:nth-child(4n+3) .stat-card-icon { background: #fecaca; color: #991b1b; }
.stat-card:nth-child(4n+4) .stat-card-icon { background: #fde68a; color: #92400e; }

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 14px;
}

.stat-card-subtext {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}
.stat-card:nth-child(4n+1) .stat-card-subtext { color: #166534; }
.stat-card:nth-child(4n+2) .stat-card-subtext { color: #075985; }
.stat-card:nth-child(4n+3) .stat-card-subtext { color: #991b1b; }
.stat-card:nth-child(4n+4) .stat-card-subtext { color: #92400e; }

/* Login Page Modern Theme */
.login-container {
    background-color: var(--neutral-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.login-box {
    background-color: var(--surface-bg);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.03);
    width: 380px;
    padding: 32px;
}
.login-header {
    text-align: center;
    margin-bottom: 24px;
}
.login-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 24px;
    margin-bottom: 12px;
}
.login-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}
.login-header p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}
.login-footer {
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
    padding-top: 16px;
    text-align: center;
}
.login-demo {
    font-size: 12.5px;
    color: var(--text-muted);
}

/* MS Word Page Editor styling */
.word-editor-container {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.word-toolbar {
    background-color: #ffffff;
    border-bottom: 1px solid #cbd5e1;
    padding: 10px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.word-toolbar-group {
    display: flex;
    gap: 4px;
    border-right: 1px solid #e2e8f0;
    padding-right: 12px;
    align-items: center;
}
.word-toolbar-group:last-child {
    border-right: none;
    padding-right: 0;
}

.word-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    height: 32px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    gap: 6px;
    transition: all 0.15s ease;
}

.word-btn i {
    font-size: 14px;
}

.word-btn:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.word-btn.active {
    background-color: #e2e8f0;
    color: var(--primary-color);
    border-color: #cbd5e1;
}

.word-select {
    height: 32px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0 8px;
    font-size: 12.5px;
    color: #475569;
    background: #ffffff;
    cursor: pointer;
    outline: none;
}

.word-workspace {
    padding: 30px;
    display: flex;
    justify-content: center;
    background-color: #cbd5e1; /* Dark grey backdrop like page layouts */
    overflow-x: auto;
    min-height: 550px;
}

.word-page-sheet {
    background-color: #ffffff;
    width: 100%;
    max-width: 800px;
    min-height: 500px;
    padding: 40px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    outline: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: #1e293b;
    line-height: 1.6;
    border: 1px solid #cbd5e1;
}

.word-page-sheet p {
    margin-bottom: 8px;
}

.word-page-sheet h3 {
    margin-top: 20px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #1e3a8a;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 4px;
    text-transform: uppercase;
}

.word-page-sheet table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 13.5px;
}

.word-page-sheet th, .word-page-sheet td {
    border: 1px solid #cbd5e1;
    padding: 10px 12px;
    text-align: left;
}

.word-page-sheet th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
}

.word-page-sheet tr:hover {
    background-color: #f8fafc;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6); /* Slate dark backdrop with opacity */
    backdrop-filter: blur(4px); /* Modern frosted glass look */
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.show {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}
.modal-content {
    background-color: var(--surface-bg);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.15s ease;
}
.modal-close:hover {
    color: var(--text-main);
}
.modal-body {
    padding: 24px;
}
.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

