/* === Color palette === */
:root {
    --accent: #5b9bd5;
    --accent-dark: #3a7cc0;
    --accent-gradient: linear-gradient(135deg, #6db3f2, #5b9bd5, #3a7cc0);
    --accent-light: #eef5fc;
    --green: #48bb78;
    --green-dark: #38a169;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --border: #e2e8f0;
    --bg: #dceefb;
}

body {
    background: linear-gradient(170deg, #e8f4fd 0%, #c5dff8 40%, #a3c9f0 70%, #7db3e8 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Cg fill='%234a90c4' fill-opacity='0.035'%3E%3Cpath d='M75 30c-2.2 0-4 1.8-4 4v2h-4a3 3 0 00-3 3v14a3 3 0 003 3h16a3 3 0 003-3V39a3 3 0 00-3-3h-4v-2c0-2.2-1.8-4-4-4zm0 2c1.1 0 2 .9 2 2v2h-4v-2c0-1.1.9-2 2-2zm0 8a5 5 0 110 10 5 5 0 010-10zm0 2a3 3 0 100 6 3 3 0 000-6z'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

/* === Navbar — blue gradient === */
.navbar.is-dark {
    background: var(--accent-gradient);
}

.navbar.is-dark .navbar-item,
.navbar.is-dark .navbar-link {
    color: #fff;
}

.navbar.is-dark .navbar-end .navbar-item:last-child {
    margin-right: 10px !important;
}

/* === Stats cards === */
.stats-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.2rem 1rem;
    text-align: center;
}

.stats-card .stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stats-card .stats-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* === Section title with icon === */
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
}

.section-title i {
    color: #ecc94b;
    margin-right: 0.4rem;
}

/* === New project button — green === */
.button.is-create {
    background-color: var(--green);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    height: auto;
}

.button.is-create:hover {
    background-color: var(--green-dark);
}

/* === Project cards === */
.project-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.project-card .card-header {
    background: var(--accent-gradient);
    padding: 1rem 1.2rem;
    border-radius: 12px 12px 0 0;
}

.project-card .card-header.is-completed {
    background: linear-gradient(135deg, #68d391, #48bb78, #38a169);
}

.project-card .card-header-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0;
}


.project-card .card-header .status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
}

.project-card .card-body {
    padding: 1rem 1.2rem;
}

.project-card .photo-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.project-card .photo-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.project-card .date-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.project-card .fields-tag {
    background-color: var(--accent-light);
    color: var(--accent-dark);
    border: 1px solid #d0e3f5;
    border-radius: 6px;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
}

/* Card action buttons */
.project-card .card-actions {
    padding: 0.8rem 1.2rem;
    border-top: 1px solid var(--border);
}

.project-card .card-actions .button {
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    height: auto;
}

.btn-fill { background-color: #ed8936; color: #fff; border: none; }
.btn-fill:hover { background-color: #dd6b20; color: #fff; }
.btn-edit { background-color: #667eea; color: #fff; border: none; }
.btn-edit:hover { background-color: #5a67d8; color: #fff; }
.btn-public { background-color: var(--green); color: #fff; border: none; }
.btn-public:hover { background-color: var(--green-dark); color: #fff; }

/* === Pagination === */
.pagination {
    gap: 0.5rem;
}

.pagination-link, .pagination-previous, .pagination-next {
    border-radius: 8px;
    border: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-dark);
}

.pagination-link.is-current {
    background: var(--accent-gradient);
    border-color: var(--accent);
    color: #fff;
}

.pagination-link:hover:not(.is-current),
.pagination-previous:hover:not([disabled]),
.pagination-next:hover:not([disabled]) {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination-previous[disabled],
.pagination-next[disabled] {
    opacity: 0.4;
    pointer-events: none;
}

/* === Photo list rows (view/public) === */
.photo-row {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0;
}

.photo-row .columns {
    margin-bottom: 0 !important;
}

.photo-row .field {
    margin-bottom: 0.4rem;
}

.photo-row img {
    object-fit: cover;
    border-radius: 6px;
}

.photo-row .photo-index {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Form inputs */
.input, .textarea {
    border-radius: 6px;
    border: 1.5px solid var(--border);
}

.input:focus, .textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.125em rgba(91, 155, 213, 0.15);
}

.input.is-success, .textarea.is-success {
    border-color: #48c78e;
    box-shadow: 0 0 0 0.125em rgba(72, 199, 142, 0.2);
}

.input.is-danger, .textarea.is-danger {
    border-color: #f14668;
    box-shadow: 0 0 0 0.125em rgba(241, 70, 104, 0.2);
}

.label {
    font-weight: 600;
    color: var(--text-dark);
}

/* === Buttons general === */
.button.is-primary {
    background-color: var(--accent);
    border-color: transparent;
    border-radius: 8px;
    font-weight: 600;
}

.button.is-primary:hover {
    background-color: var(--accent-dark);
}

/* === Upload zone === */
.upload-zone {
    border: 2px dashed #c4cdd6;
    border-radius: 10px;
    cursor: pointer;
    background-color: #fafbfc;
    transition: border-color 0.2s, background-color 0.2s;
}

.upload-zone:hover,
.upload-zone.is-dragover {
    border-color: var(--accent);
    background-color: var(--accent-light);
}

/* === Toast notifications === */
.notification-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* === Photo thumbnails in public rows === */
.photo-row .photo-thumb {
    width: min(200px, 25vw);
    height: min(200px, 25vw);
    min-width: 80px;
    min-height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.photo-row .photo-placeholder {
    width: min(200px, 25vw);
    height: min(200px, 25vw);
    min-width: 80px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf2f7;
    border-radius: 8px;
}

/* Fix flex child overflow — allow text column to shrink */
.photo-row .column:not(.is-narrow) {
    min-width: 0;
    overflow: hidden;
}

.photo-row .photo-index {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === Mobile: shrink photo in public rows === */
@media screen and (max-width: 768px) {
    .photo-row .photo-thumb,
    .photo-row .photo-placeholder {
        width: 100px !important;
        height: 100px !important;
    }
}

/* === Photo list in edit === */
.photo-item img {
    object-fit: cover;
    border-radius: 4px;
}

/* === Login page === */
.hero.is-fullheight .box {
    border: 1px solid var(--border);
    border-radius: 12px;
}

.hero.is-fullheight .title {
    color: var(--accent);
}

/* === Save button (public) === */
.save-btn {
    background-color: var(--green);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.8rem 3rem;
}

.save-btn:hover {
    background-color: var(--green-dark);
    color: #fff;
}

/* === Photo modal === */
.photo-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.photo-modal.is-active {
    display: flex;
}

.photo-modal img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
}

/* === Footer === */
.footer {
    padding: 1.5rem;
    background-color: #edf2f7;
}

/* === Helpers === */
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }

/* Box override — remove bulma shadow */
.box {
    box-shadow: none;
}
