* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    background: #f4f6f9;
    color: #222;
}


/* LOGIN */

.login-body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background:
        linear-gradient(
            135deg,
            #eef2f7,
            #f8f9fb
        );
}

.login-container {
    width: 390px;
    background: white;
    padding: 45px 40px;
    border-radius: 16px;
    box-shadow:
        0 10px 35px rgba(0,0,0,0.08);
}

.login-logo {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
}

.login-logo span {
    color: #4c6ef5;
}

.login-description {
    text-align: center;
    color: #888;
    margin-top: 8px;
    margin-bottom: 35px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-top: 18px;
    margin-bottom: 7px;
}

input,
textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
}

input:focus,
textarea:focus {
    border-color: #4c6ef5;
}

.primary-button {
    width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 13px;
    background: #4c6ef5;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 25px;
}

.primary-button:hover {
    background: #3b5bdb;
}

.error-message {
    margin-top: 20px;
    color: #e03131;
    text-align: center;
}


/* HEADER */

.header {
    height: 68px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 45px;
    border-bottom: 1px solid #e8e8e8;
}

.header-logo {
    font-size: 21px;
    font-weight: 700;
}

.header-logo span {
    color: #4c6ef5;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #555;
}

.logout {
    color: #888;
    text-decoration: none;
}


/* PAGE */

.container {
    max-width: 1100px;
    margin: 45px auto;
    padding: 0 20px;
}

.page-title {
    font-size: 27px;
    margin-bottom: 7px;
}

.page-description {
    color: #777;
    margin-bottom: 35px;
}


/* CARDS */

.cards {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: #222;
    box-shadow:
        0 3px 12px rgba(0,0,0,0.04);
    border: 1px solid #eee;
    transition: 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 7px 20px rgba(0,0,0,0.07);
}

.card-title {
    color: #777;
    font-size: 14px;
}

.card-number {
    font-size: 34px;
    font-weight: 700;
    margin-top: 10px;
}

.card-write {
    background: #4c6ef5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}


/* TABLE */

.panel {
    background: white;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
}

.panel-title {
    padding: 20px 25px;
    font-weight: 700;
    border-bottom: 1px solid #eee;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

th {
    font-size: 13px;
    color: #777;
    background: #fafafa;
}

td a {
    color: #222;
    text-decoration: none;
}

td a:hover {
    color: #4c6ef5;
}

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pending {
    background: #fff3bf;
    color: #e67700;
}

.answered {
    background: #d3f9d8;
    color: #2b8a3e;
}


/* FORM */

.form-panel {
    background: white;
    max-width: 800px;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #eee;
}

textarea {
    resize: vertical;
    min-height: 200px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    color: #666;
}


/* POST */

.post-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 20px;
}

.post-title {
    font-size: 24px;
    font-weight: 700;
}

.post-meta {
    color: #999;
    margin-top: 10px;
    margin-bottom: 30px;
}

.post-content {
    white-space: pre-wrap;
    line-height: 1.7;
}

.answer-box {
    background: #f8f9ff;
    border-left: 4px solid #4c6ef5;
}

.notification-consent {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: #222;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}

.notification-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1001;
    max-width: min(360px, calc(100vw - 40px));
    padding: 14px 18px;
    border-radius: 10px;
    background: #222;
    color: white;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
}

.notification-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media(max-width: 700px) {

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

    .header {
        padding: 0 20px;
    }
}
