/* MoM System - Stylesheet */

:root {
    --primary: #1F4E79;
    --primary-light: #2E75B6;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --light: #f8f9fa;
    --dark: #343a40;
    --border: #dee2e6;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.5;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--primary);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
}

.logo:hover {
    color: #e0e0e0;
}

/* Navigation */
.nav {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-item a {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.nav-item a:hover {
    color: var(--primary);
    background: var(--light);
}

.nav-item a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Main Content */
.main {
    padding: 30px 0;
}

.page-title {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 20px;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--primary);
}

.card-body {
    padding: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-value.danger {
    color: var(--danger);
}

.stat-value.success {
    color: var(--success);
}

.stat-label {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Filters */
.filters {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filters-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--secondary);
    margin-bottom: 5px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(46, 117, 182, 0.2);
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

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

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

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

.btn-secondary:hover {
    background: #e9ecef;
}

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

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

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    background: var(--primary);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

tr:hover {
    background: var(--light);
}

tr.overdue {
    background: #fff5f5;
}

tr.overdue:hover {
    background: #ffecec;
}

tr.action-row {
    background: #fffbeb;
}

tr.decision-row {
    background: #ecfdf5;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-overdue {
    background: #fee2e2;
    color: #991b1b;
}

.badge-open {
    background: #dbeafe;
    color: #1e40af;
}

.badge-closed {
    background: #d1fae5;
    color: #065f46;
}

.badge-deferred {
    background: #e5e7eb;
    color: #374151;
}

/* Topic Header */
.topic-header {
    background: var(--primary);
    color: white;
    padding: 10px 15px;
    font-weight: 600;
    margin-top: 20px;
    border-radius: 4px 4px 0 0;
}

.topic-header:first-child {
    margin-top: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.results-count {
    font-weight: 600;
    color: var(--primary);
}

/* Export Section */
.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.export-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.export-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.export-card p {
    color: var(--secondary);
    margin-bottom: 20px;
}

/* Meeting List */
.meeting-list {
    list-style: none;
}

.meeting-item {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meeting-item:hover {
    background: var(--light);
}

.meeting-info h4 {
    color: var(--primary);
    margin-bottom: 5px;
}

.meeting-info p {
    color: var(--secondary);
    font-size: 0.85rem;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Grid Layout */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .nav-list {
        flex-wrap: wrap;
    }

    .header-content {
        flex-direction: column;
        gap: 10px;
    }
}

/* Responsive Table */
@media (max-width: 992px) {
    table {
        font-size: 0.8rem;
    }

    th, td {
        padding: 8px 10px;
    }
}

/* Status Update Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-backdrop.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 8px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal h3 {
    color: var(--primary);
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}
