/* ============================================
   RRI Meet - Global Styles
   Production CSS - CodeIgniter 4
   ============================================ */

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}
.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 380px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid;
}
.toast.show { transform: translateX(0); }
.toast-success { border-left-color: #10b981; }
.toast-error { border-left-color: #ef4444; }
.toast-info { border-left-color: #3b82f6; }
.toast-icon { font-size: 24px; }
.toast-content { flex: 1; }
.toast-title { font-weight: 700; font-size: 14px; color: #1a1a2e; }
.toast-message { font-size: 12px; color: #6b7280; margin-top: 2px; }
.toast-close { background: none; border: none; font-size: 18px; color: #9ca3af; cursor: pointer; padding: 4px; }

/* Navigation */
.nav {
    background: #003366;
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nav h1 { font-size: 20px; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-right span { color: #e0e7ff; font-size: 14px; }
.nav a { color: #60a5fa; text-decoration: none; font-weight: 500; }

/* Layout */
.container { max-width: 960px; margin: 0 auto; padding: 24px 16px; }

/* Stats Grid */
.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.stat-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}
.stat-card .icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 12px;
}
.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
}
.stat-card .label {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 2px;
}
.icon-blue { background: #dbeafe; color: #2563eb; }
.icon-green { background: #d1fae5; color: #059669; }
.icon-purple { background: #ede9fe; color: #7c3aed; }
.icon-orange { background: #ffedd5; color: #ea580c; }

/* Action Buttons */
.action-btn {
    flex: 1;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s, background 0.2s;
}
.action-btn:active { transform: scale(0.97); }
.btn-primary {
    background: #003366;
    color: white;
    box-shadow: 0 4px 12px rgba(0,51,102,0.25);
}
.btn-primary:hover { background: #002244; }
.btn-secondary {
    background: white;
    color: #003366;
    border: 2px solid #e5e7eb;
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h2 { color: #1a1a2e; font-size: 22px; }
.back-link {
    color: #003366;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 14px;
    margin-top: 24px;
}
.section-title a {
    font-size: 14px;
    color: #003366;
    text-decoration: none;
    font-weight: 500;
}

/* Cards */
.card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

/* Meeting Items */
.meeting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}
.meeting-item:last-child { border-bottom: none; }
.meeting-info { flex: 1; }
.meeting-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 3px;
}
.meeting-title a { color: #003366; text-decoration: none; }
.meeting-title a:hover { text-decoration: underline; }
.meeting-meta { font-size: 12px; color: #9ca3af; }
.meeting-desc {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.status-active { background: #d1fae5; color: #059669; }
.status-scheduled { background: #dbeafe; color: #2563eb; }
.status-ended { background: #f3f4f6; color: #6b7280; }
.status-cancelled { background: #fee2e2; color: #dc2626; }

/* Buttons */
.join-btn {
    padding: 8px 16px;
    background: #003366;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    margin-left: 10px;
}
.join-btn:hover { background: #002244; }
.btn-create {
    padding: 10px 20px;
    background: #003366;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-create:hover { background: #002244; }
.copy-btn {
    padding: 6px 10px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}
.copy-btn:hover { background: #e5e7eb; color: #374151; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }
.empty-state h3 { color: #6b7280; margin-bottom: 8px; }

/* Error/Success Messages */
.error-msg {
    background: #fee2e2;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.info-box {
    background: #eff6ff;
    color: #2563eb;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

/* Forms */
label {
    display: block;
    margin-bottom: 4px;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
}
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 16px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #003366;
}
.btn-submit {
    width: 100%;
    padding: 14px;
    background: #003366;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.btn-submit:hover { background: #002244; }
.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.checkbox-wrap input { width: auto; margin: 0; }

/* Tables */
.card table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}
.card th {
    text-align: left;
    padding: 12px;
    background: #f8fafc;
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}
.card td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    vertical-align: middle;
}
.role-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.role-admin { background: #fee2e2; color: #dc2626; }
.role-moderator { background: #dbeafe; color: #2563eb; }
.role-participant { background: #f3f4f6; color: #6b7280; }
.status-active { color: #10b981; font-weight: 600; }
.status-inactive { color: #ef4444; font-weight: 600; }
.action-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-edit {
    padding: 6px 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn-edit:hover { background: #2563eb; }
.btn-delete {
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn-delete:hover { background: #dc2626; }

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.2s;
}
.filter-btn:hover { border-color: #003366; color: #003366; }
.filter-btn.active {
    background: #003366;
    color: white;
    border-color: #003366;
}

/* Login Form */
.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 440px;
}
.login-box h1 {
    color: #003366;
    text-align: center;
    margin-bottom: 5px;
    font-size: 28px;
}
.login-box p {
    color: #999;
    text-align: center;
    margin-bottom: 30px;
    font-size: 15px;
}

/* Responsive - Tablet */
@media (min-width: 640px) {
    .stats { grid-template-columns: repeat(4, 1fr); }
    .container { padding: 24px; }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .nav { padding: 12px 16px; }
    .nav h1 { font-size: 18px; }
    .nav-right span { font-size: 12px; }
    .container { padding: 16px 12px; }
    .welcome h2 { font-size: 19px; }
    .stat-card { padding: 16px; }
    .stat-card .value { font-size: 24px; }
    .stat-card .icon { width: 38px; height: 38px; font-size: 18px; }
    .action-btn { padding: 12px 12px; font-size: 13px; }
    .toast-container { top: 10px; right: 10px; }
    .toast { min-width: 240px; max-width: 90vw; }
    .meeting-item { flex-direction: column; align-items: flex-start; gap: 10px; }
    .meeting-actions { width: 100%; justify-content: space-between; }
    .login-box { padding: 30px 22px; border-radius: 16px; max-width: 100%; }
    .login-box h1 { font-size: 24px; }
    .login-box p { font-size: 14px; margin-bottom: 25px; }
}
