* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f4f5f7;
    color: #1a1a1a;
}

header.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: #fff;
    border-bottom: 1px solid #e3e5e8;
}

header.topbar h1 {
    font-size: 18px;
    margin: 0;
}

header.topbar .user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
}

header.topbar button.link {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px;
}

.login-wrap {
    max-width: 360px;
    margin: 120px auto;
    text-align: center;
    background: #fff;
    padding: 40px 32px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.login-wrap h1 {
    margin-bottom: 32px;
    font-size: 22px;
}

.btn-social {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn-google { background: #fff; color: #333; }
.btn-kakao { background: #FEE500; color: #191919; border-color: #FEE500; }

.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.group-card {
    cursor: pointer;
    transition: box-shadow .15s;
}
.group-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.group-card h3 { margin: 0 0 8px; }
.group-card .invite { font-size: 12px; color: #888; }
.group-card .tags { margin-top: 8px; }
.tag {
    display: inline-block;
    background: #eef1f5;
    color: #556;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 4px;
}

h2.section-title {
    font-size: 16px;
    margin: 28px 0 12px;
    color: #333;
}

form.inline-form label {
    display: block;
    font-size: 13px;
    color: #555;
    margin: 10px 0 4px;
}

input[type=text], input[type=number], input[type=date], input[type=month], input[type=file], select, textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #d5d8dc;
    border-radius: 6px;
    font-size: 14px;
}

.checkbox-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.checkbox-row label { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: normal; margin: 0; }

button.primary, .btn-social + button {
    margin-top: 14px;
    padding: 10px 18px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}
button.primary:hover { background: #1558b3; }

button.secondary {
    padding: 6px 12px;
    background: #eef1f5;
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

button.danger { background: #fdeaea; color: #c62828; }

.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e3e5e8;
}
.tabs button {
    padding: 10px 16px;
    background: none;
    border: none;
    font-size: 14px;
    color: #777;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.tabs button.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 600;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
table.data-table th, table.data-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.calendar-cell {
    min-height: 70px;
    background: #fafbfc;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 4px;
    font-size: 11px;
}
.calendar-cell .date-num { font-weight: 600; color: #999; margin-bottom: 4px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 1px; }

.log-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.log-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.log-item .meta { flex: 1; font-size: 13px; }
.status-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}
.status-VERIFIED { background: #e6f4ea; color: #1e7e34; }
.status-MISSED { background: #fdeaea; color: #c62828; }
.status-EXEMPTED { background: #eef1f5; color: #555; }

.error-box {
    background: #fdeaea;
    color: #c62828;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}

.empty-note { color: #999; font-size: 13px; padding: 12px 0; }

.reaction-row { display: flex; gap: 6px; margin-top: 6px; }
.reaction-row input { width: 60px; padding: 4px 6px; font-size: 13px; }
