/**
 * Student Complaint Tracker - Professional UI Stylesheet
 */

/* CSS Variables - Professional Color Scheme */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;

    --secondary-color: #64748b;
    --secondary-hover: #475569;

    --success-color: #10b981;
    --success-light: #d1fae5;

    --warning-color: #f59e0b;
    --warning-light: #fef3c7;

    --danger-color: #ef4444;
    --danger-light: #fee2e2;

    --info-color: #3b82f6;
    --info-light: #dbeafe;

    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --sidebar-bg: #1e293b;
    --sidebar-text: #e2e8f0;
    --sidebar-hover: #334155;
    --sidebar-active: #2563eb;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --transition: all 0.2s ease;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 24px;
}

.login-box {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Dashboard Layout */
.dashboard-page {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.sidebar-header p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--radius);
    margin-bottom: 4px;
    font-size: 14px;
}

.sidebar-nav a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav a.active {
    background: var(--sidebar-active);
    color: #fff;
}

.sidebar-nav a.logout {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 24px 32px;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.main-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stats-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--primary-light);
    margin-bottom: 8px;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.stat-info p {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
}

.stat-trend.positive {
    background: var(--success-light);
    color: #065f46;
}

.stat-trend.negative {
    background: var(--danger-light);
    color: #991b1b;
}

.stat-total .stat-icon {
    background: var(--primary-light);
}

.stat-pending .stat-icon {
    background: var(--warning-light);
}

.stat-progress .stat-icon {
    background: var(--info-light);
}

.stat-resolved .stat-icon {
    background: var(--success-light);
}

.stat-urgent .stat-icon {
    background: var(--danger-light);
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.charts-2 {
    grid-template-columns: repeat(2, 1fr);
}

.charts-3 {
    grid-template-columns: repeat(3, 1fr);
}

.chart-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.chart-container {
    min-height: 200px;
}

.bar-chart-item {
    margin-bottom: 16px;
}

.bar-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.bar-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-fill {
    height: 28px;
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    min-width: 4px;
    transition: width 0.5s ease;
}

.bar-fill.month-bar {
    background: var(--info-color);
}

.bar-fill.status-pending {
    background: var(--warning-color);
}

.bar-fill.status-in_progress {
    background: var(--info-color);
}

.bar-fill.status-resolved {
    background: var(--success-color);
}

.bar-fill.status-closed {
    background: var(--secondary-color);
}

.bar-fill.priority-low {
    background: var(--secondary-color);
}

.bar-fill.priority-medium {
    background: var(--warning-color);
}

.bar-fill.priority-high {
    background: var(--danger-color);
}

.bar-fill.priority-urgent {
    background: #dc2626;
}

.bar-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    min-width: 50px;
}

.pie-chart-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pie-legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-color);
    border-radius: var(--radius);
    transition: var(--transition);
}

.pie-legend-item:hover {
    background: var(--border-light);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.status-pending {
    background: var(--warning-color);
}

.legend-color.status-in_progress {
    background: var(--info-color);
}

.legend-color.status-resolved {
    background: var(--success-color);
}

.legend-color.status-closed {
    background: var(--secondary-color);
}

.legend-color.type-student {
    background: var(--primary-color);
}

.legend-color.type-staff {
    background: var(--success-color);
}

.legend-color.type-visitor {
    background: var(--warning-color);
}

.legend-color.type-other {
    background: var(--secondary-color);
}

.legend-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.legend-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Tables */
.tables-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.tables-2 {
    grid-template-columns: repeat(2, 1fr);
}

.table-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.table-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.table-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table.full-width {
    width: 100%;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-color);
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-color);
}

.data-table .text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
    font-size: 13px;
}

/* Status & Priority Badges */
.status-badge,
.priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.status-pending {
    background: var(--warning-light);
    color: #92400e;
}

.status-in_progress {
    background: var(--info-light);
    color: #1e40af;
}

.status-resolved {
    background: var(--success-light);
    color: #065f46;
}

.status-closed {
    background: var(--bg-color);
    color: var(--text-secondary);
}

.priority-low {
    background: var(--bg-color);
    color: var(--text-secondary);
}

.priority-medium {
    background: var(--warning-light);
    color: #92400e;
}

.priority-high {
    background: var(--danger-light);
    color: #991b1b;
}

.priority-urgent {
    background: #dc2626;
    color: #fff;
}

/* Forms */
.form-content,
.manage-content,
.reports-content,
.setup-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.form-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--card-bg);
    color: var(--text-primary);
}

.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(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-value {
    padding: 12px 0;
    font-size: 14px;
    color: var(--text-primary);
}

.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-success {
    background: var(--success-color);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
}

.btn-warning {
    background: var(--warning-color);
    color: #fff;
}

.btn-info {
    background: var(--info-color);
    color: #fff;
}

.btn-danger {
    background: var(--danger-color);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Filters Section */
.filters-section {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filters-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    width: 100%;
}

.filters-form .form-group {
    margin-bottom: 0;
    min-width: 180px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    margin: 40px auto;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: var(--transition);
}

.close-btn:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

/* Complaint Details */
.complaint-details .detail-row {
    margin-bottom: 20px;
}

.complaint-details .detail-row strong {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.complaint-details hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 24px 0;
}

.description-box,
.resolution-box {
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--radius);
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.7;
}

/* History */
.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.history-action {
    font-weight: 600;
    margin: 4px 0;
    color: var(--text-primary);
}

.history-notes {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Actions Cell */
.actions-cell {
    white-space: nowrap;
}

.actions-cell .btn {
    margin-right: 6px;
}

.actions-cell .btn:last-child {
    margin-right: 0;
}

/* Quick Actions */
.quick-actions {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.quick-actions h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Export Section */
.export-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.export-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.export-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Summary Cards */
.summary-cards {
    margin-bottom: 24px;
}

.summary-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.summary-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.summary-stats {
    display: flex;
    gap: 40px;
}

.summary-item {
    display: flex;
    gap: 8px;
}

.summary-item .label {
    color: var(--text-muted);
}

.summary-item .value {
    font-weight: 600;
}

/* Filter Section */
.filter-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.date-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.date-filter-form .form-group {
    margin-bottom: 0;
    min-width: 150px;
}

/* No Data Message */
.no-data {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-size: 14px;
}

/* Setup Tabs */
.setup-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.tab-btn {
    padding: 14px 24px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.setup-section {
    margin-bottom: 32px;
}

.setup-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.setup-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.form-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.category-form {
    background: var(--bg-color);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.full-width {
    width: 100%;
}

/* Change Password Page */
.change-password-content {
    max-width: 500px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-2,
    .charts-3 {
        grid-template-columns: 1fr;
    }

    .tables-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 240px;
    }

    .main-content {
        margin-left: 240px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .stats-4 {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .summary-stats {
        flex-direction: column;
        gap: 16px;
    }

    .main-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.chart-card,
.table-card,
.quick-actions,
.export-section {
    animation: fadeIn 0.3s ease forwards;
}

/* Notifications */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notifications-dropdown {
    position: relative;
}

.notifications-btn {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.notifications-btn:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.notifications-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 380px;
    max-width: 450px;
    max-height: 600px;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: 8px;
    display: none;
    z-index: 1000;
}

.notifications-menu.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.notifications-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.mark-all-read {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.mark-all-read:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.notifications-list {
    padding: 0;
}

.no-notifications {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-notifications i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.no-notifications p {
    font-size: 14px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--bg-color);
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.notification-info {
    background: var(--info-light);
    color: var(--info-color);
}

.notification-warning {
    background: var(--warning-light);
    color: var(--warning-color);
}

.notification-error {
    background: var(--danger-light);
    color: var(--danger-color);
}

.notification-success {
    background: var(--success-light);
    color: var(--success-color);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 12px;
    color: var(--text-muted);
}

.mark-read-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    opacity: 0;
}

.notification-item:hover .mark-read-btn {
    opacity: 1;
}

.mark-read-btn:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.notifications-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.view-all-notifications {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.view-all-notifications:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    z-index: 2000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.toast-content i {
    font-size: 20px;
    color: var(--primary-color);
}

.toast-text {
    flex: 1;
}

.toast-text strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-text span {
    font-size: 13px;
    color: var(--text-secondary);
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.toast-close:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

/* Attachments */
.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.attachment-item:hover {
    background: var(--border-light);
}

.attachment-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.attachment-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.attachment-link i {
    color: var(--text-muted);
}

.attachment-size {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}