@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --brand: #00a651;
    --brand-dark: #008f46;
    --brand-soft: #eaf8f0;
    --navy: #073e5b;
    --navy-dark: #052f45;
    --ink: #15232d;
    --muted: #687883;
    --surface: #ffffff;
    --surface-soft: #f6f8f8;
    --border: #dfe7e5;
    --danger: #dc3b45;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(12, 42, 54, .04), 0 8px 24px rgba(12, 42, 54, .05);
    --shadow-md: 0 18px 50px rgba(8, 48, 65, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    min-height: 100vh;
    color: var(--ink);
    background: radial-gradient(circle at 8% 0%, rgba(0, 166, 81, .10), transparent 28rem), radial-gradient(circle at 95% 8%, rgba(7, 62, 91, .09), transparent 32rem), #f5f8f7;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(rgba(7, 62, 91, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(7, 62, 91, .025) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent 75%);
}
a, button, input { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }

.header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 14px 24px;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid rgba(223, 231, 229, .85);
}
.header-content {
    width: 100%;
    max-width: 1180px;
    min-height: 64px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.logo, .brand-link, .header-content > a:first-child {
    display: flex;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
}
.logo-img-container { flex: 0 0 auto; }
.logo-img-container img { width: auto; height: 68px; display: block; }
.logo-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
    white-space: nowrap;
}
.logo-text span:first-child { color: var(--navy-dark); font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.logo-text span:last-child { color: var(--muted); font-size: 12px; font-weight: 500; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 40px 24px 64px; }
.card {
    position: relative;
    padding: 28px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.intro-card {
    overflow: hidden;
    min-height: 310px;
    padding: 56px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(115deg, rgba(5, 47, 69, .98), rgba(7, 62, 91, .94)), var(--navy);
    border: 0;
    box-shadow: var(--shadow-md);
    color: #fff;
}
.intro-card::before {
    content: '';
    position: absolute;
    width: 360px;
    height: 360px;
    right: -80px;
    top: -145px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 211, 104, .45), rgba(0, 166, 81, .04) 65%, transparent 68%);
}
.intro-card::after {
    content: '';
    position: absolute;
    width: 190px;
    height: 190px;
    right: 110px;
    bottom: -105px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    box-shadow: 0 0 0 36px rgba(255, 255, 255, .035), 0 0 0 72px rgba(255, 255, 255, .025);
}
.intro-card > * { position: relative; z-index: 1; }
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 11px;
    color: #baf4d3;
    background: rgba(0, 166, 81, .16);
    border: 1px solid rgba(78, 224, 147, .28);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.intro-card h1 { max-width: 720px; margin-bottom: 14px; color: #fff; font-size: clamp(34px, 5vw, 56px); line-height: 1.03; letter-spacing: -.045em; }
.intro-card p { max-width: 620px; margin-bottom: 28px; color: rgba(255, 255, 255, .72); font-size: 17px; }
.intro-buttons, .meeting-actions, .admin-nav, .participant-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

.btn {
    min-height: 42px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(10, 34, 45, .05);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); border-color: #b8c8c4; box-shadow: 0 8px 22px rgba(8, 48, 65, .10); }
.btn:focus-visible, .pagination-link:focus-visible, input:focus-visible { outline: 3px solid rgba(0, 166, 81, .22); outline-offset: 2px; }
.btn-primary { color: #fff; background: var(--brand); border-color: var(--brand); box-shadow: 0 10px 26px rgba(0, 166, 81, .25); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.intro-card .btn-primary { min-height: 48px; padding-inline: 20px; }
.btn-outline { background: rgba(255, 255, 255, .86); }
.btn-detail { color: var(--navy); }
.btn-excel { color: var(--brand-dark); }
.btn-delete, .btn-logout { color: var(--danger); }
.btn-delete:hover, .btn-logout:hover { background: #fff3f3; border-color: #ffc9cd; }
.btn-compact { min-height: 36px; padding: 7px 11px; font-size: 12px; }
.btn-full { width: 100%; }

.meetings-panel { padding: 30px; }
.list-header, .card-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.list-header { margin-bottom: 22px; }
.list-title h2, .list-header > h2, .card-header h3 { display: flex; align-items: center; gap: 10px; color: var(--navy-dark); }
.list-title h2, .list-header > h2 { font-size: 20px; letter-spacing: -.02em; }
.list-title h2 i, .list-header > h2 i, .card-header h3 i { color: var(--brand); }
.list-title p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.badge, .list-header .badge, #participantCount {
    flex: 0 0 auto;
    padding: 6px 10px;
    color: var(--navy);
    background: #eef4f4;
    border: 1px solid #dde7e5;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.meeting-list { display: grid; gap: 12px; }
.meeting-list .meeting-item {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.meeting-list .meeting-item:hover { transform: translateY(-1px); border-color: rgba(0, 166, 81, .42); box-shadow: 0 12px 32px rgba(8, 48, 65, .08); }
.meeting-info { min-width: 0; }
.meeting-info h3 { color: var(--ink); font-size: 16px; font-weight: 750; letter-spacing: -.015em; }
.meeting-meta { margin-top: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.meeting-meta span { padding: 5px 8px; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); background: var(--surface-soft); border-radius: 8px; font-size: 12px; font-weight: 550; }
.meeting-meta i { color: var(--brand); font-size: 14px; }
.meeting-actions { flex: 0 0 auto; }
.meeting-actions form { display: inline-flex; }

.pagination { margin-top: 24px; padding-top: 22px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--border); }
.pagination-pages { display: flex; gap: 6px; }
.pagination-link {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: .18s ease;
}
a.pagination-link:hover { color: var(--navy); border-color: #aabbb7; }
.pagination-link.active { color: #fff; background: var(--navy); border-color: var(--navy); }
.pagination-link.disabled { opacity: .45; cursor: not-allowed; }

.empty-state { padding: 56px 20px; color: var(--muted); background: var(--surface-soft); border: 1px dashed #cbd8d5; border-radius: var(--radius-md); text-align: center; }
.empty-state i { display: block; margin-bottom: 12px; color: #9aacb0; font-size: 42px; }
.empty-state h4 { margin-bottom: 6px; color: var(--ink); }

.brand-link { text-decoration: none; }
.form-container { max-width: 680px; padding-top: 48px; }
.form-card, .admin-login-card, .center-card { padding: 38px; }
.form-card, .center-card { text-align: center; }
.form-card h1, .center-card h1, .admin-login-header h1 { color: var(--navy-dark); font-size: 28px; letter-spacing: -.035em; }
.form-description, .admin-login-header p, .center-card > p { margin: 8px auto 28px; color: var(--muted); font-size: 14px; }
.form-icon, .admin-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border: 1px solid #ccebd9;
    border-radius: 15px;
    font-size: 27px;
}
.form-group { margin-bottom: 18px; display: flex; flex-direction: column; gap: 7px; text-align: left; }
.form-group label { display: flex; align-items: center; gap: 7px; color: #33454f; font-size: 13px; font-weight: 700; }
.form-group label i { color: var(--brand); }
.form-control, .form-group input, .copy-url-container input {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cfdad8;
    border-radius: 11px;
    font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.form-control:focus, .form-group input:focus, .copy-url-container input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 166, 81, .10); }
.form-control::placeholder, .form-group input::placeholder { color: #9aa8ad; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.alert { margin-bottom: 20px; padding: 12px 14px; display: flex; align-items: center; gap: 8px; border-radius: 11px; font-size: 13px; font-weight: 600; }
.alert-error { color: #a8222d; background: #fff1f2; border: 1px solid #ffc9ce; }
.admin-login-card { max-width: 460px; margin: 44px auto 0; }
.admin-login-header { text-align: center; margin-bottom: 24px; }
.admin-form { display: flex; flex-direction: column; }
.admin-login-footer { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); text-align: center; }

.admin-badge { padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px; color: var(--brand-dark); background: var(--brand-soft); border: 1px solid #ccebd9; border-radius: 999px; font-size: 12px; font-weight: 800; }
.admin-header-card { padding: 30px; background: linear-gradient(135deg, #073e5b, #0b526f); border: 0; color: #fff; }
.admin-title { display: flex; align-items: center; gap: 11px; }
.admin-title i { color: #76eba9; font-size: 26px; }
.admin-title h1 { font-size: 26px; letter-spacing: -.03em; }
.admin-header-card p { margin-top: 6px; color: rgba(255, 255, 255, .68); font-size: 13px; }
.admin-meeting-item { border-left: 3px solid var(--brand) !important; }

.detail-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 24px; }
.detail-left-column { display: flex; flex-direction: column; gap: 24px; }
.detail-left-column > .card, .detail-grid > .card { margin-bottom: 0; }
.participants-card { padding: 0; overflow: hidden; }
.card-header { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.participants-card > .card-header { position: relative; z-index: 2; margin: 0; padding: 20px 22px; background: rgba(255, 255, 255, .96); }
.card-header h3 { font-size: 15px; }
.detail-list { display: grid; gap: 10px; }
.detail-list p { min-height: 43px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; color: #43545e; background: var(--surface-soft); border-radius: 10px; font-size: 13px; }
.detail-list p i { color: var(--brand); font-size: 17px; }
.qr-card { text-align: center; }
.qr-code-container { display: inline-block; padding: 12px; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 12px 30px rgba(8, 48, 65, .08); }
.qr-code-container img { width: 210px; height: 210px; display: block; border-radius: 8px; }
.copy-url-container { margin-top: 18px; padding: 5px; display: flex; align-items: center; gap: 6px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 13px; }
.copy-url-container input { min-width: 0; min-height: 38px; padding: 8px 10px; background: transparent; border: 0; box-shadow: none; overflow: hidden; text-overflow: ellipsis; }
.copy-url-container button { min-height: 38px; padding: 8px 12px; display: inline-flex; align-items: center; gap: 6px; color: #fff; background: var(--navy); border: 0; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; }
.helper-text { margin-top: 14px; color: var(--muted); font-size: 12px; }
.participant-list { max-height: 680px; overflow-y: auto; list-style: none; scrollbar-width: thin; scrollbar-color: #bdcbc8 transparent; }
.participant-item { min-height: 66px; padding: 11px 22px; display: flex; align-items: center; border-bottom: 1px solid #edf1f0; transition: background .18s ease; }
.participant-item:hover { background: #f8faf9; }
.participant-item:last-child { border-bottom: 0; }
.participant-avatar { width: 36px; height: 36px; margin-right: 11px; display: flex; align-items: center; justify-content: center; color: var(--brand-dark); background: var(--brand-soft); border: 1px solid #ccebd9; border-radius: 11px; font-size: 13px; font-weight: 800; }
.participant-details { min-width: 0; }
.participant-details p { color: var(--ink); font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.participant-details span { color: var(--muted); font-size: 11px; }
.status-indicator { width: 7px; height: 7px; margin-left: auto; background: #22b96c; border-radius: 50%; box-shadow: 0 0 0 4px rgba(34, 185, 108, .10); }
.live-indicator { display: inline-flex; align-items: center; gap: 5px; color: var(--brand-dark); font-size: 11px; font-weight: 750; }
.live-dot { width: 7px; height: 7px; background: #22b96c; border-radius: 50%; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 185, 108, .28); } 50% { opacity: .7; box-shadow: 0 0 0 5px rgba(34, 185, 108, 0); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(-5px); background: #eaf8f0; } to { opacity: 1; transform: translateY(0); background: transparent; } }
.participant-item.new-participant { animation: slideIn .45s ease-out; }

.centered-page { display: grid; place-items: center; padding: 24px; }
.center-container { width: 100%; min-height: calc(100vh - 48px); display: grid; place-items: center; }
.center-card { width: 100%; max-width: 480px; margin: 0; }
.compact-brand { width: fit-content; margin: 0 auto 26px; padding: 10px 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.compact-brand img { width: auto; height: 50px; display: block; }
.join-form { width: 100%; }
.success-icon { margin: 0 auto 18px; color: var(--brand); font-size: 64px; line-height: 1; }
.success-card h1 { margin-bottom: 8px; }
.success-badge { width: fit-content; margin: 24px auto 0; padding: 7px 11px; color: var(--brand-dark); background: var(--brand-soft); border: 1px solid #ccebd9; border-radius: 999px; font-size: 12px; font-weight: 700; }

@media (max-width: 900px) {
    .detail-grid { grid-template-columns: 1fr; }
    .participant-list { max-height: 560px; }
    .intro-card { min-height: 285px; padding: 42px; }
    .meeting-list .meeting-item { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 680px) {
    .header { padding: 10px 16px; }
    .header-content { min-height: 54px; gap: 12px; }
    .logo-img-container img { height: 52px; }
    .logo-text span:first-child { font-size: 13px; }
    .logo-text span:last-child { display: none; }
    .container { padding: 24px 14px 44px; }
    .card { padding: 20px; border-radius: 18px; }
    .intro-card { min-height: 300px; padding: 28px 22px; }
    .intro-card::before { width: 250px; height: 250px; right: -100px; }
    .intro-card h1 { font-size: 36px; }
    .intro-card p { font-size: 15px; }
    .meetings-panel { padding: 18px; }
    .list-header { align-items: flex-start; }
    .list-title p { display: none; }
    .meeting-list .meeting-item { padding: 16px; gap: 16px; }
    .meeting-actions { width: 100%; }
    .meeting-actions .btn, .meeting-actions form { flex: 1; }
    .meeting-actions form .btn { width: 100%; }
    .pagination-nav { font-size: 0; padding: 0; min-width: 38px; }
    .pagination-nav i { font-size: 19px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-card, .admin-login-card, .center-card { padding: 24px; }
    .admin-nav { justify-content: flex-end; }
    .admin-badge { display: none; }
    .admin-nav .btn { width: 38px; padding: 0; font-size: 0; }
    .admin-nav .btn i { font-size: 18px; }
    .card-header { align-items: flex-start; flex-direction: column; }
    .participants-card > .card-header { gap: 12px; }
    .participant-tools { width: 100%; justify-content: space-between; }
    .qr-code-container img { width: 190px; height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
