/* 
* AI Manager Dashboard Styles
* Modern, clean dashboard UI with responsive design
*/

/* ---------- VARIABLES ---------- */
:root {
    /* Color scheme */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #f97316;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Neutral colors */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;
    --border-color: #e5e7eb;
    --background-light: #f9fafb;
    --background-white: #ffffff;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-xxl: 1rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Typography */
    --font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Layout */
    --header-height: 64px;
    --sidebar-width: 280px;
    --sidebar-width-collapsed: 80px;
}

/* Dark theme */
.dark-theme {
    --text-primary: #f9fafb;
    --text-secondary: #e5e7eb;
    --text-tertiary: #9ca3af;
    --border-color: #374151;
    --background-light: #111827;
    --background-white: #1f2937;
}

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

html {
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--background-light);
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
}

h1 {
    font-size: var(--font-size-3xl);
}

h2 {
    font-size: var(--font-size-2xl);
}

h3 {
    font-size: var(--font-size-xl);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- UTILITIES ---------- */
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-info { color: var(--info); }

.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--secondary-color); }
.bg-success { background-color: var(--success); }
.bg-warning { background-color: var(--warning); }
.bg-error { background-color: var(--error); }
.bg-info { background-color: var(--info); }

.ml-1 { margin-left: var(--spacing-sm); }
.ml-2 { margin-left: var(--spacing-md); }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-6 { margin-bottom: var(--spacing-xxl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

.d-flex { display: flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

.justify-content-start { justify-content: flex-start; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.justify-content-between { justify-content: space-between; }

.align-items-start { align-items: flex-start; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

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

.text-sm { font-size: var(--font-size-sm); }
.text-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }

/* ---------- GRID SYSTEM ---------- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -1rem;
    margin-right: -1rem;
}

.col-12 { width: 100%; }
.col-6 { width: 50%; }
.col-4 { width: 33.333333%; }
.col-3 { width: 25%; }

[class^="col-"] {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .col-md-6 { width: 50%; }
    .col-md-4 { width: 33.333333%; }
    .col-md-3 { width: 25%; }
    .d-md-block { display: block; }
    .d-md-none { display: none; }
}

@media (min-width: 1024px) {
    .col-lg-6 { width: 50%; }
    .col-lg-4 { width: 33.333333%; }
    .col-lg-3 { width: 25%; }
    .d-lg-block { display: block; }
    .d-lg-none { display: none; }
}

/* ---------- COMPONENTS ---------- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

.btn-secondary {
    background-color: white;
    color: var(--text-primary);
    border-color: var(--border-color);
}

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

.btn-light {
    background-color: var(--background-light);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-light:hover {
    background-color: #edf2f7;
}

.btn-light.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-link {
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    padding: 0.25rem 0.5rem;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
    width: 2.25rem;
    height: 2.25rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-xs);
}

/* Button Groups */
.btn-group {
    display: inline-flex;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.btn-group .btn {
    border-radius: 0;
    border-right-width: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.btn-group .btn:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    border-right-width: 1px;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: var(--font-size-md);
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.15rem rgba(79, 70, 229, 0.25);
}

.form-check {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.3em;
    margin-right: 0.5rem;
    vertical-align: top;
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    appearance: none;
    border-radius: 0.25em;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.75em;
}

.form-check-label {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25em 0.5em;
    font-size: 0.75em;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--radius-full);
    background-color: var(--background-light);
    color: var(--text-secondary);
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: white;
}

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

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

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

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

.badge-light {
    background-color: var(--background-light);
    color: var(--text-secondary);
}

.badge-dark {
    background-color: var(--text-primary);
    color: white;
}

/* Cards */
.card {
    background-color: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

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

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

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.card-title {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Dropdowns */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    cursor: pointer;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 100;
    width: 240px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    background-color: var(--background-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
}

.dropdown-item i {
    margin-right: 0.75rem;
    width: 1rem;
    text-align: center;
}

.dropdown-item:hover {
    background-color: var(--background-light);
    text-decoration: none;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

/* Tables */
.widget-table {
    width: 100%;
    border-collapse: collapse;
}

.widget-table th, 
.widget-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
}

.widget-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--background-light);
}

.widget-table tr:last-child td {
    border-bottom: none;
}

/* Optimization tables */
.optimization-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.optimization-table th, 
.optimization-table td {
    padding: 0.625rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.optimization-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background-color: rgba(0, 0, 0, 0.02);
}

.optimization-table tr:last-child td {
    border-bottom: none;
}

.optimization-table tfoot {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.02);
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-primary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    white-space: nowrap;
    z-index: 10;
}

[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
    z-index: 10;
}

/* Loaders */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
    display: none;
}

.loader.active {
    display: flex;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--background-light);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    width: 90%;
    max-width: 500px;
    background-color: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-container {
    transform: scale(1);
}

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

.modal-title {
    margin: 0;
    font-weight: 600;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    display: flex;
    align-items: center;
    width: 300px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background-color: var(--background-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s forwards;
}

.toast.removing {
    animation: toastOut 0.3s forwards;
}

.toast-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.toast-content {
    flex: 1;
}

.toast-message {
    font-size: var(--font-size-sm);
    margin: 0;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 1.125rem;
    padding: 0;
    margin-left: 0.75rem;
}

.toast-info .toast-icon {
    color: var(--info);
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-error .toast-icon {
    color: var(--error);
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ---------- LAYOUT ---------- */

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: var(--background-light);
}

.auth-card {
    background-color: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    position: relative;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Dashboard Layout */
.dashboard {
    min-height: 100vh;
    display: grid;
    grid-template-rows: var(--header-height) 1fr;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-areas: 
        "header header"
        "sidebar main";
}

.header {
    grid-area: header;
    background-color: var(--background-white);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar {
    grid-area: sidebar;
    background-color: var(--background-white);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    transition: width 0.3s ease;
}

.main-content {
    grid-area: main;
    padding: 2rem;
    overflow-y: auto;
}

/* Responsive layout */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 0 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        width: var(--sidebar-width);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 90;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
}

/* Header Components */
.header-brand {
    display: flex;
    align-items: center;
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
}

.header-brand i {
    font-size: 1.5rem;
}

.header-search {
    flex: 1;
}

.header-search .form-control {
    max-width: 400px;
    background-color: var(--background-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

.header-user:hover {
    background-color: var(--background-light);
}

.header-user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.header-user-info {
    display: none;
}

.header-user-name {
    font-weight: 500;
    line-height: 1.2;
}

.header-user-role {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

@media (min-width: 640px) {
    .header-user-info {
        display: block;
    }
}

/* Sidebar Navigation */
.nav {
    padding: 1.5rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-tertiary);
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    transition: all 0.2s ease;
    position: relative;
}

.nav-item i {
    font-size: 1rem;
    width: 1.5rem;
    margin-right: 0.75rem;
    text-align: center;
}

.nav-item:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.nav-item.active {
    color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.1);
    font-weight: 500;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--primary-color);
}

.nav-item .badge {
    margin-left: auto;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    margin: 0;
    font-size: var(--font-size-2xl);
    font-weight: 600;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
}

/* Widgets */
.widget {
    background-color: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100%;
}

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

.widget-title {
    margin: 0;
    font-weight: 600;
}

.widget-body {
    padding: 1.25rem;
    position: relative;
}

/* Stats Cards */
.stats-card {
    background-color: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    height: 100%;
}

.stats-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-size: 1.25rem;
}

.stats-card-content {
    flex: 1;
}

.stats-card-value {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stats-card-label {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: 0.5rem;
}

.stats-card-trend {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
}

.stats-card-trend.positive {
    color: var(--success);
}

.stats-card-trend.negative {
    color: var(--error);
}

/* Chart Container */
.chart-container {
    width: 100%;
    height: 300px;
    position: relative;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.activity-text {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: 0.25rem;
}

.activity-time {
    color: var(--text-tertiary);
    font-size: var(--font-size-xs);
}

/* Comment List */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
}

.comment-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    background-color: var(--background-light);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-name {
    font-weight: 500;
}

.comment-time {
    color: var(--text-tertiary);
    font-size: var(--font-size-xs);
}

.comment-text {
    margin-bottom: 0.75rem;
    font-size: var(--font-size-sm);
}

.comment-actions {
    display: flex;
    gap: 0.5rem;
}

.comment-actions .btn {
    padding: 0;
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

/* AI Action Cards */
.action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .action-grid {
        grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    }
}

.action-card {
    background-color: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

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

.action-card.removing {
    transform: translateX(100px);
    opacity: 0;
}

.action-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    font-size: 1rem;
    flex-shrink: 0;
}

.action-meta {
    flex: 1;
}

.action-type {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.action-date {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

.action-priority {
    display: flex;
    align-items: center;
    font-size: var(--font-size-xs);
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
}

.action-priority.high {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.action-priority.medium {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--secondary-color);
}

.action-priority.low {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.action-body {
    padding: 1.25rem;
}

.action-heading {
    font-weight: 600;
    font-size: var(--font-size-lg);
    margin-bottom: 0.75rem;
}

.action-suggestion {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.action-content {
    margin-bottom: 1.5rem;
}

.action-preview {
    background-color: var(--background-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.action-reasoning {
    background-color: rgba(79, 70, 229, 0.05);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.action-reasoning-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.action-reasoning-list {
    padding-left: 1.5rem;
    margin: 0;
    font-size: var(--font-size-sm);
}

.action-reasoning-list li {
    margin-bottom: 0.5rem;
}

.action-reasoning-list li:last-child {
    margin-bottom: 0;
}

.action-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.action-controls {
    display: flex;
    gap: 0.75rem;
}

.action-options {
    display: flex;
    gap: 0.5rem;
}

/* Social Post Preview */
.social-post-preview {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: white;
}

.social-post-text {
    padding: 1rem;
    font-size: var(--font-size-sm);
}

.social-post-image {
    max-height: 300px;
    overflow: hidden;
}

.social-post-image img {
    width: 100%;
    object-fit: cover;
}

/* No Data Message */
.no-data-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    background-color: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.no-data-icon {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.no-data-message h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.no-data-message p {
    color: var(--text-secondary);
    max-width: 400px;
    margin-bottom: 0;
}

/* Actions Container */
.actions-container {
    position: relative;
    min-height: 200px;
}

/* Protected Page Loader */
.protected-page .loader {
    z-index: 2000;
}