
/* Action bar styling */
.action-bar {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.action-bar .action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}


/* Admin CSS for CompliantFlow */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Custom styles for published status icon */
.fa-check-circle.text-success {
    color: #22c55e !important;
    font-size: 1.2em;
}

:root {
    --primary: #1a56db;
    --primary-dark: #1e429f;
    --secondary: #6b7280;
    --secondary-dark: #4b5563;
    --success: #059669;
    --success-light: #d1fae5;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --error: #dc2626;
    --error-light: #fee2e2;
    --info: #0369a1;
    --info-light: #e0f2fe;
    --background: #f9fafb;
    --foreground: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
}

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

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--foreground);
    background-color: var(--background);
}

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

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

p {
    margin-bottom: 1em;
}

.btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
}

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

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

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

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

.btn-success:hover {
    background-color: #047857;
}

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

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.flash-messages {
    margin-bottom: 1.25rem;
}

.alert {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.25rem;
    position: relative;
}

.alert-success {
    background-color: var(--success-light);
    color: var(--success);
}

.alert-info {
    background-color: var(--info-light);
    color: var(--info);
}

.alert-warning {
    background-color: var(--warning-light);
    color: var(--warning);
}

.alert-danger {
    background-color: var(--error-light);
    color: var(--error);
}

.close-alert {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.close-alert:hover {
    opacity: 1;
}

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

label {
    display: block;
    margin-bottom: 0.3125rem;
    font-weight: 500;
    color: var(--foreground);
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26, 86, 219, 0.1);
}

textarea {
    min-height: 200px;
    resize: vertical;
}

textarea.content {
    min-height: 400px;
}

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

.admin-sidebar {
    width: 220px;
    background-color: var(--primary);
    color: white;
    padding: 1.25rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
    }
}

.admin-sidebar h1 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0.3125rem;
}

.admin-sidebar .admin-subtitle {
    opacity: 0.8;
    margin-bottom: 1.875rem;
    font-size: 0.875rem;
}

.admin-nav ul {
    list-style: none;
}

.admin-nav li {
    margin-bottom: 0.625rem;
}

.admin-nav a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 0.625rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.admin-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.admin-nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-content {
    flex: 1;
    padding: 1.875rem;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    overflow-y: auto;
}

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

.admin-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.admin-header-user {
    font-size: 0.875rem;
    color: var(--muted);
}

.admin-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5625rem;
    overflow: hidden;
}

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

.card-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.card-body {
    padding: 1.25rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 500;
    color: var(--muted);
    font-size: 0.875rem;
}

tbody tr:hover {
    background-color: var(--background);
}

.status-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background-color: var(--warning-light);
    color: var(--warning);
}

.status-approved {
    background-color: var(--success-light);
    color: var(--success);
}

.status-rejected {
    background-color: var(--error-light);
    color: var(--error);
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.date {
    color: var(--muted);
    font-size: 0.875rem;
}

.grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.grid-full {
    grid-column: 1 / -1;
}

.buttons {
    display: flex;
    gap: 0.625rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

@media (max-width: 768px) {
    .buttons {
        flex-direction: column;
    }
    
    .buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
    overflow-x: auto;
}

.tab {
    padding: 0.625rem 0.9375rem;
    cursor: pointer;
    font-size: 0.875rem;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.tab.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.empty-state {
    padding: 1.875rem;
    text-align: center;
    color: var(--muted);
}

.empty-state p {
    margin-bottom: 1.25rem;
}

/* Dashboard stats styling */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
    display: flex;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 1rem;
    background-color: rgba(26,86,219,0.1);
    color: var(--primary);
}

.stat-details h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    margin-top: 0;
}

.stat-details p {
    color: var(--secondary);
    margin: 0;
}

.stat-link {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.stat-link i {
    margin-left: 0.25rem;
}

.stat-card:hover .stat-link {
    opacity: 1;
}

/* Status badge styling */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge i {
    margin-right: 0.35rem;
    font-size: 0.7rem;
}

.status-pending {
    background-color: var(--warning-light);
    color: var(--warning);
}

.status-approved {
    background-color: var(--success-light);
    color: var(--success);
}

.status-rejected {
    background-color: var(--error-light);
    color: var(--error);
}

.status-imported {
    background-color: var(--info-light);
    color: var(--info);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--foreground);
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .quick-actions {
        flex-direction: column;
    }
    
    .quick-actions .btn {
        width: 100%;
        text-align: center;
    }
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filters {
    display: flex;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.3125rem 0.625rem;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    background-color: white;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

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

.no-results {
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Dashboard actions styling */
.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.action-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.action-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--foreground);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Buttons styling */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
    gap: 0.5rem;
}

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

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

.btn-secondary {
    background-color: white;
    color: var(--secondary-dark);
    border: 1px solid var(--border);
}

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

.btn i {
    font-size: 0.875rem;
}

/* API reference code styling */
.action-card code {
    display: block;
    background-color: rgba(0,0,0,0.03);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-family: 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
    font-size: 0.875rem;
    margin: 0.5rem 0 1rem;
    overflow-x: auto;
    white-space: pre;
}

.action-card p {
    margin-bottom: 0.5rem;
    color: var(--secondary-dark);
}

/* Dashboard recent content table */
.dashboard-recent {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.header-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-with-actions h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.status-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-link {
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    background-color: var(--background);
    color: var(--secondary-dark);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s ease;
}

.filter-link:hover {
    background-color: rgba(0,0,0,0.03);
    color: var(--primary);
}

.filter-link.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .header-with-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        margin-top: 0.5rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .status-filter {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
}

.btn-outline-secondary {
    background-color: transparent;
    color: var(--secondary-dark);
    border: 1px solid var(--border);
}

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

/* Table styling */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border);
    color: var(--secondary-dark);
    font-weight: 600;
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.table tr:hover td {
    background-color: rgba(0,0,0,0.01);
}

/* Empty state for tables without rows */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

/* Pagination styling */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    padding: 0;
    margin: 0;
}

.page-item {
    display: inline-block;
}

.page-item.disabled .page-link {
    color: var(--muted);
    pointer-events: none;
    background-color: var(--background);
    border-color: var(--border);
}

.page-item.active .page-link {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary);
    background-color: white;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: var(--background);
    border-color: var(--primary);
}

/* Admin card styling */
.admin-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-body {
    padding: 1.5rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .dashboard-stats,
    .dashboard-actions {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}