/* Meeting Minutes - Professional Stylesheet */
/* For Project & Construction Management */

/* ==================== CSS VARIABLES ==================== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;

    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

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

/* ==================== HEADER ==================== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

.logo-container {
    flex: 0 0 150px;
}

.logo-placeholder {
    width: 150px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.logo-placeholder:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.logo-placeholder input[type="file"] {
    display: none;
}

.logo-placeholder label {
    cursor: pointer;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-placeholder img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none;
}

.logo-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
}

.header-content {
    flex: 1;
    text-align: center;
}

.header h1 {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.header h1:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
    border-radius: 4px;
}

.subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

/* ==================== MEETING INFO ==================== */
.meeting-info {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item input,
.info-item select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--card-bg);
    transition: all 0.2s ease;
}

.info-item input:focus,
.info-item select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ==================== SECTIONS ==================== */
.section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.section h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

/* ==================== TABLES ==================== */
.attendance-table,
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.attendance-table th,
.items-table th {
    background: var(--bg-color);
    padding: 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.attendance-table td,
.items-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.attendance-table tr:hover,
.items-table tr:hover {
    background-color: var(--bg-color);
}

.table-input,
.table-select,
.table-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    background: var(--card-bg);
    transition: all 0.2s ease;
}

.table-input:focus,
.table-select:focus,
.table-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.table-textarea {
    min-height: 60px;
    resize: vertical;
}

.center {
    text-align: center;
}

/* Status styling */
.status-select {
    font-weight: 500;
}

tr.status-completed {
    background-color: rgba(34, 197, 94, 0.1);
}

tr.status-in-progress {
    background-color: rgba(37, 99, 235, 0.1);
}

tr.status-overdue {
    background-color: rgba(239, 68, 68, 0.1);
}

/* Priority colors */
.priority-select option[value="high"] {
    color: var(--danger-color);
}

.priority-select option[value="medium"] {
    color: var(--warning-color);
}

.priority-select option[value="low"] {
    color: var(--success-color);
}

/* ==================== AGENDA ITEMS ==================== */
.agenda-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.agenda-item {
    background: var(--bg-color);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border-color);
}

.agenda-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.agenda-number {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 16px;
    min-width: 30px;
}

.agenda-title {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
}

.agenda-duration {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
}

.agenda-notes {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    resize: vertical;
}

/* ==================== FILTER BAR ==================== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.filter-bar label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-bar select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

/* ==================== GANTT CHART ==================== */
.gantt-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.gantt-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
}

.gantt-chart {
    min-width: 800px;
    transition: transform 0.2s ease;
}

.gantt-header {
    display: flex;
    background: var(--card-bg);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
}

.gantt-task-column {
    min-width: 200px;
    max-width: 200px;
    padding: 12px;
    border-right: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gantt-dates {
    flex: 1;
    display: flex;
    position: relative;
}

.gantt-date-cell {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    border-right: 1px solid var(--border-color);
}

.gantt-date-cell:last-child {
    border-right: none;
}

.gantt-body {
    min-height: 100px;
}

.gantt-row {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    min-height: 50px;
}

.gantt-row:hover {
    background: rgba(37, 99, 235, 0.05);
}

.gantt-task-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    padding: 4px;
    border-radius: var(--radius-sm);
}

.gantt-task-name:focus {
    outline: none;
    background: var(--card-bg);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.gantt-bar-container {
    flex: 1;
    position: relative;
    height: 100%;
}

.gantt-bar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 28px;
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    overflow: hidden;
    min-width: 60px;
}

.gantt-bar:hover {
    filter: brightness(1.1);
    box-shadow: var(--shadow-md);
}

.gantt-bar.completed {
    background: var(--success-color);
}

.gantt-bar.in-progress {
    background: var(--primary-color);
}

.gantt-bar.pending {
    background: var(--secondary-color);
}

.gantt-bar-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.gantt-bar-label {
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 0 8px;
    position: relative;
    z-index: 1;
}

/* ==================== SAFETY SECTION ==================== */
.safety-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.stat-box {
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-box label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.stat-box input {
    width: 100%;
    padding: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.safety-notes label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.safety-notes textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    resize: vertical;
}

/* ==================== WEATHER SECTION ==================== */
.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.weather-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.weather-item label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.weather-item input,
.weather-item select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

/* ==================== NOTES SECTION ==================== */
.notes-section textarea {
    width: 100%;
    min-height: 150px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    resize: vertical;
    line-height: 1.6;
}

/* ==================== SIGNATURE SECTION ==================== */
.signature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.signature-box {
    text-align: center;
}

.signature-box label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.signature-line {
    border-bottom: 1px solid var(--text-primary);
    margin-bottom: 8px;
    height: 40px;
}

.signature-box p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

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

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

.btn-add {
    background: transparent;
    color: var(--primary-color);
    border: 2px dashed var(--primary-color);
    padding: 12px 24px;
}

.btn-add:hover {
    background: rgba(37, 99, 235, 0.05);
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

/* ==================== FOOTER ACTIONS ==================== */
.footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 24px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}

.modal h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.modal-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-content label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.modal-content input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    body {
        background: white;
        font-size: 11px;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .header {
        background: var(--primary-color) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 16px;
    }

    .no-print,
    .btn,
    .btn-icon,
    .filter-bar,
    .gantt-controls,
    .footer-actions {
        display: none !important;
    }

    .attendance-table th,
    .items-table th {
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    input, select, textarea {
        border: none !important;
        background: transparent !important;
        padding: 4px !important;
    }

    .gantt-bar {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .logo-container {
        order: -1;
    }

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

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-actions {
        flex-direction: column;
    }

    .footer-actions .btn {
        width: 100%;
    }

    .attendance-table,
    .items-table {
        display: block;
        overflow-x: auto;
    }

    .gantt-container {
        overflow-x: scroll;
    }
}

/* ==================== CHECKBOX STYLING ==================== */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ==================== FOCUS STATES ==================== */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section {
    animation: fadeIn 0.3s ease;
}

.modal {
    animation: fadeIn 0.2s ease;
}
