/* Board Management Portal - Stylesheet */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

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

a:hover {
    text-decoration: underline;
}

/* Navigation */
.navbar {
    background: var(--dark);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-brand a {
    color: white;
    font-size: 1.25rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-menu a {
    color: #cbd5e1;
    padding: 0.5rem 0;
}

.nav-menu a:hover, .nav-menu a.active {
    color: white;
    text-decoration: none;
}

.nav-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #94a3b8;
}

.nav-user a {
    color: #94a3b8;
}

.nav-user a:hover {
    color: white;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
}

.btn:hover {
    text-decoration: none;
    opacity: 0.9;
}

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

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

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

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

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

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

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

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

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

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

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

.table tr:hover {
    background: #f1f5f9;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    transition: opacity 0.3s;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

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

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary { background: #dbeafe; color: #1e40af; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-secondary { background: #e2e8f0; color: #475569; }

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

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

.stat-label {
    color: var(--secondary);
    font-size: 0.875rem;
}

/* Member Card */
.member-card {
    text-align: center;
    padding: 1.5rem;
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.member-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.member-role {
    color: var(--secondary);
    font-size: 0.875rem;
}

/* Meeting Item */
.meeting-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.meeting-item:last-child {
    border-bottom: none;
}

.meeting-date {
    text-align: center;
    min-width: 60px;
}

.meeting-date .day {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.meeting-date .month {
    font-size: 0.75rem;
    color: var(--secondary);
    text-transform: uppercase;
}

.meeting-info h4 {
    margin-bottom: 0.25rem;
}

.meeting-meta {
    color: var(--secondary);
    font-size: 0.875rem;
}

/* Document Item */
.doc-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    transition: background 0.2s;
}

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

.doc-icon {
    font-size: 1.5rem;
}

.doc-info {
    flex: 1;
}

.doc-title {
    font-weight: 500;
}

.doc-meta {
    font-size: 0.75rem;
    color: var(--secondary);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.login-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--secondary);
    font-size: 0.875rem;
    margin-top: auto;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--secondary); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* Board Selector Dropdown */
.board-selector {
    position: relative;
}

.nav-separator {
    color: rgba(255,255,255,0.3);
    padding: 0 0.5rem;
}

.board-dropdown {
    position: relative;
    display: inline-block;
}

.board-dropdown-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.board-dropdown-btn:hover {
    background: rgba(255,255,255,0.2);
}

.board-dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    padding-top: 0.5rem;
    min-width: 200px;
    z-index: 1000;
}

.board-dropdown-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.5rem;
}

.board-dropdown-content-inner {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
}

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

.board-dropdown-content a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.9rem;
}

.board-dropdown-content a:hover {
    background: var(--light);
    text-decoration: none;
}

.board-dropdown-content a.active {
    background: #e0f2fe;
    color: var(--primary);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-user {
        margin-left: 0;
        margin-top: 1rem;
        flex-wrap: wrap;
    }
    
    .board-dropdown-content {
        right: auto;
        left: 0;
    }
    
    .container {
        padding: 1rem;
    }
}
