* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: Tahoma, Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    padding: 20px;
    line-height: 1.7;
}
.container { max-width: 1100px; margin: 0 auto; }
h1 { font-size: 24px; }
h2 { font-size: 18px; margin-bottom: 15px; color: #1a73e8; }

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 18px 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    flex-wrap: wrap;
    gap: 10px;
}

.card {
    background: #fff;
    padding: 22px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
}

label {
    display: block;
    margin: 12px 0 6px;
    font-size: 14px;
    font-weight: bold;
    color: #444;
}
input[type=text], input[type=password], input[type=file], textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    background: #fafafa;
}
input:focus, textarea:focus { outline: none; border-color: #1a73e8; background: #fff; }
textarea { resize: vertical; }

.btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    font-family: inherit;
    margin-top: 12px;
    transition: .2s;
}
.btn-primary { background: #1a73e8; color: #fff; }
.btn-primary:hover { background: #1557b0; }
.btn-secondary { background: #e8eaf6; color: #1a73e8; }
.btn-secondary:hover { background: #c5cae9; }
.btn-danger { background: #f44336; color: #fff; }
.btn-danger:hover { background: #c62828; }
.btn-sm { padding: 5px 12px; font-size: 13px; margin: 0; }

.alert {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border-right: 4px solid #4caf50; }
.alert-error { background: #ffebee; color: #c62828; border-right: 4px solid #f44336; }

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td {
    padding: 10px 12px;
    text-align: right;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}
th { background: #f5f7fa; color: #555; }

.post-card .post-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.post-card .post-header h2 { color: #222; margin: 0; }
.post-date { font-size: 12px; color: #999; }
.post-desc { color: #555; margin-bottom: 15px; }

.post-image img {
    max-width: 100%;
    border-radius: 10px;
    margin: 10px 0;
    display: block;
}
.post-file {
    background: #f5f7fa;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 0;
}
.post-code {
    background: #fff;
    border: 1px dashed #ccc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.muted { color: #999; font-style: italic; }

/* صفحه ورود */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-box {
    background: #fff;
    padding: 35px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    width: 100%;
    max-width: 380px;
}
.login-box h2 { text-align: center; margin-bottom: 25px; }
.login-box button { width: 100%; }
.error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}
.login-box a { color: #1a73e8; text-decoration: none; font-size: 14px; }