/* Stili area admin */
* { box-sizing: border-box; margin: 0; padding: 0; }

body.admin-page {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #1a2f28 0%, #2d5a4a 100%);
    min-height: 100vh;
    padding: 2rem;
    color: #2c2c2c;
}

.login-box {
    max-width: 400px;
    margin: 4rem auto;
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-box h1 {
    font-size: 1.5rem;
    color: #2d5a4a;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #5a5a5a;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.login-form .form-group {
    margin-bottom: 1rem;
}

.login-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.login-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.login-form input:focus {
    outline: none;
    border-color: #2d5a4a;
}

.login-form .btn {
    width: 100%;
    padding: 0.9rem;
    margin-top: 0.5rem;
}

.login-hint {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #888;
}

.login-hint code {
    background: #f0f0f0;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.error-msg {
    color: #c33;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Dashboard */
.admin-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.admin-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.admin-header h1 {
    flex: 1;
    font-size: 1.5rem;
    color: #2d5a4a;
}

.link-out {
    color: #2d5a4a;
    text-decoration: none;
    font-weight: 500;
}

.link-out:hover {
    text-decoration: underline;
}

.btn-logout {
    background: #888;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-logout:hover {
    background: #666;
}

.admin-section {
    margin-bottom: 2.5rem;
}

.admin-section h2 {
    font-size: 1.2rem;
    color: #2d5a4a;
    margin-bottom: 1rem;
}

.post-form .form-group {
    margin-bottom: 1rem;
}

.post-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.post-form input,
.post-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.post-form textarea {
    resize: vertical;
    min-height: 80px;
}

.post-form input:focus,
.post-form textarea:focus {
    outline: none;
    border-color: #2d5a4a;
}

/* Editor stile Word */
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: #f0ede8;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.editor-btn {
    padding: 6px 10px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.editor-btn:hover {
    background: #ddd;
}

.editor-btn:active, .editor-btn.active {
    background: #2d5a4a;
    color: white;
}

.toolbar-sep {
    width: 1px;
    height: 20px;
    background: #ccc;
    margin: 0 4px;
}

.editor-color-wrap {
    display: inline-flex;
    align-items: center;
}

.editor-color-wrap .editor-color {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
}

.editor-color-btn {
    font-weight: bold;
    color: #2d5a4a;
}

.editor-content {
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    font-size: 1rem;
    line-height: 1.6;
    outline: none;
}

.editor-content:focus {
    border-color: #2d5a4a;
}

.editor-content:empty::before {
    content: attr(data-placeholder);
    color: #999;
}

.editor-content p {
    margin: 0 0 0.5em;
}

.editor-content p:last-child {
    margin-bottom: 0;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}

.btn-primary {
    background: #2d5a4a;
    color: white;
}

.btn-primary:hover {
    background: #3d7a65;
}

.btn-secondary {
    background: #f0ede8;
    color: #2d5a4a;
    margin-bottom: 1rem;
}

.btn-secondary:hover {
    background: #e0ddd8;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-danger {
    background: #c33;
    color: white;
}

.btn-danger:hover {
    background: #a22;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f8f8;
    border-radius: 8px;
}

.post-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.post-date {
    font-size: 0.85rem;
    color: #888;
}

.empty-msg {
    color: #888;
    padding: 1rem;
}

.image-upload-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.image-upload-row .image-file {
    flex: 1;
    min-width: 140px;
}

.image-upload-hint {
    color: #888;
    font-size: 0.9rem;
}

.image-upload-row input[type="url"] {
    flex: 1;
    min-width: 200px;
}

.image-preview {
    margin-top: 0.5rem;
}

.image-preview img {
    max-width: 150px;
    max-height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.export-section p {
    margin-bottom: 1rem;
    color: #5a5a5a;
    font-size: 0.95rem;
}

.export-output {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    overflow-x: auto;
    max-height: 200px;
    overflow-y: auto;
}
