/**
 * GrowLog Styles
 * 
 * Estilos completos para el sistema GrowLogs:
 * - Wizard de setup y actualización
 * - Timeline vertical
 * - Gráficos
 * - Lista de diarios
 * - Responsive design
 */

/* ============================================================================
   VARIABLES CSS
   ========================================================================= */

:root {
    --gd-primary: #27ae60;
    --gd-primary-dark: #229954;
    --gd-primary-light: #2ecc71;
    --gd-secondary: #3498db;
    --gd-secondary-dark: #2980b9;
    --gd-accent: #f39c12;
    --gd-accent-dark: #e67e22;
    --gd-danger: #e74c3c;
    --gd-danger-dark: #c0392b;
    --gd-success: #27ae60;
    --gd-warning: #f39c12;
    --gd-bg-light: #f8f9fa;
    --gd-bg-white: #ffffff;
    --gd-border: #e2e8f0;
    --gd-border-dark: #cbd5e1;
    --gd-text: #2c3e50;
    --gd-text-light: #7f8c8d;
    --gd-text-muted: #95a5a6;
    --gd-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --gd-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --gd-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --gd-shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.15);
    --gd-transition: all 0.3s ease;
}

/* ============================================================================
   WIZARD CONTAINER
   ========================================================================= */

.GrowLog-wizard-page,
.GrowLog-update-page {
    padding: 40px 20px;
    background: var(--gd-bg-light);
    min-height: 100vh;
}

.GrowLog-wizard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
    background: var(--gd-bg-white);
    border-radius: 16px;
    box-shadow: var(--gd-shadow-lg);
    position: relative;
}

.growlog-page-header {
    text-align: center;
    margin-bottom: 34px;
}

.growlog-page-eyebrow {
    margin: 0 0 10px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gd-primary);
}

.growlog-page-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.6rem);
    line-height: 1.1;
    font-weight: 800;
    color: var(--gd-text);
}

.GrowLog-update-page .update-header-info {
    position: relative;
    margin-bottom: 34px;
    padding: 28px 30px 30px;
    border: 1px solid rgba(39, 174, 96, 0.12);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(46, 204, 113, 0.12), transparent 34%),
        linear-gradient(145deg, #ffffff 0%, #f6fbf7 100%);
    box-shadow: 0 18px 40px rgba(44, 90, 62, 0.08);
    overflow: hidden;
}

.GrowLog-update-page .update-header-info::after {
    content: '';
    position: absolute;
    right: -36px;
    top: -42px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(39, 174, 96, 0.08);
    pointer-events: none;
}

.GrowLog-update-page .back-link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid rgba(39, 174, 96, 0.18);
    background: rgba(255, 255, 255, 0.82);
    color: #256544;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    transition: var(--gd-transition);
    box-shadow: 0 8px 18px rgba(46, 124, 79, 0.08);
}

.GrowLog-update-page .back-link:hover {
    transform: translateY(-2px);
    border-color: rgba(39, 174, 96, 0.3);
    background: #ffffff;
    color: #1f5136;
    box-shadow: 0 12px 22px rgba(46, 124, 79, 0.12);
}

.GrowLog-update-page .update-header-info h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    max-width: 720px;
    font-size: clamp(2rem, 4.3vw, 3rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-weight: 700;
    color: #1d3c2e;
    text-wrap: balance;
}

.GrowLog-update-page .diary-subtitle {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0;
    color: #567264;
    font-size: 1rem;
    line-height: 1.65;
    font-weight: 600;
}

/* ============================================================================
   PROGRESS BAR
   ========================================================================= */

.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
    position: relative;
    padding: 0 10%;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 15%;
    right: 15%;
    height: 3px;
    background: var(--gd-border);
    z-index: 0;
}

.wizard-progress .step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.wizard-progress .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gd-bg-white);
    border: 3px solid var(--gd-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--gd-text-light);
    transition: var(--gd-transition);
}

.wizard-progress .step-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--gd-text-light);
    transition: var(--gd-transition);
}

.wizard-progress .step.active .step-number {
    background: var(--gd-primary);
    border-color: var(--gd-primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.15);
}

.wizard-progress .step.active .step-text {
    color: var(--gd-primary);
}

.wizard-progress .step.completed .step-number {
    background: var(--gd-success);
    border-color: var(--gd-success);
    color: white;
}

.wizard-progress .step.completed .step-number::after {
    content: '✓';
}

.wizard-progress .step.completed .step-text {
    color: var(--gd-success);
}

/* ============================================================================
   WIZARD STEPS
   ========================================================================= */

.wizard-step {
    display: none;
    animation: fadeIn 0.4s ease-in;
}

.wizard-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gd-text);
    margin: 0 0 10px 0;
}

.step-subtitle {
    font-size: 16px;
    color: var(--gd-text-light);
    margin: 0;
}

.step-content {
    margin-bottom: 40px;
}

/* ============================================================================
   DEVICE SELECTION
   ========================================================================= */

.device-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gd-text);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .icon {
    font-size: 20px;
}

.device-grid-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.device-card-image {
    border: 3px solid var(--gd-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--gd-transition);
    position: relative;
    background: var(--gd-bg-white);
}

.device-card-image:hover {
    border-color: var(--gd-primary);
    transform: translateY(-4px);
    box-shadow: var(--gd-shadow-lg);
}

.device-card-image.selected {
    border-color: var(--gd-primary);
    background: rgba(39, 174, 96, 0.05);
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.1);
}

.device-card-image img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
}

.device-placeholder {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: var(--gd-bg-light);
    border-radius: 8px;
    margin-bottom: 15px;
}

.device-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gd-text);
    line-height: 1.4;
}

.device-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: var(--gd-primary);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.device-card-image.selected .device-check {
    display: flex;
}

/* Nutrient Selection Styles */
.nutrient-section {
    margin-bottom: 40px;
}

.nutrient-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.nutrient-card-image {
    border: 3px solid var(--gd-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--gd-transition);
    position: relative;
    background: var(--gd-bg-white);
}

.nutrient-card-image:hover {
    border-color: #2196f3;
    transform: translateY(-4px);
    box-shadow: var(--gd-shadow-lg);
}

.nutrient-card-image.selected {
    border-color: #2196f3;
    background: rgba(33, 150, 243, 0.05);
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1);
}

.nutrient-card-image img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
}

.nutrient-card-image .device-check {
    background: #2196f3;
}

.nutrient-card-image.selected .device-check {
    display: flex;
}

.section-divider {
    text-align: center;
    margin: 40px 0;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gd-border);
}

.section-divider span {
    background: var(--gd-bg-white);
    padding: 0 20px;
    position: relative;
    color: var(--gd-text-muted);
    font-weight: 600;
    font-size: 14px;
}

/* ============================================================================
   FORM ELEMENTS
   ========================================================================= */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gd-text);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gd-border);
    border-radius: 8px;
    font-size: 16px;
    color: var(--gd-text);
    transition: var(--gd-transition);
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--gd-primary);
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.model-preview {
    margin-top: 20px;
    padding: 20px;
    background: var(--gd-bg-light);
    border-radius: 12px;
    text-align: center;
}

.model-preview img {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
}

.hint-text {
    font-size: 13px;
    color: var(--gd-text-light);
    margin-top: 8px;
    display: block;
}

/* ============================================================================
   CROPS
   ========================================================================= */

.crop-entry {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.crop-name-field {
    flex: 2;
    margin-bottom: 0 !important;
}

.crop-quantity-field {
    flex: 1;
    margin-bottom: 0 !important;
}

.btn-remove-crop {
    width: 44px;
    height: 44px;
    border: 2px solid var(--gd-danger);
    background: var(--gd-bg-white);
    color: var(--gd-danger);
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    transition: var(--gd-transition);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-crop:hover {
    background: var(--gd-danger);
    color: white;
}

.btn-add-crop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gd-bg-light);
    border: 2px dashed var(--gd-border-dark);
    border-radius: 8px;
    color: var(--gd-text);
    font-weight: 600;
    cursor: pointer;
    transition: var(--gd-transition);
}

.btn-add-crop:hover {
    background: var(--gd-primary);
    border-color: var(--gd-primary);
    color: white;
}

/* ============================================================================
   TITLE PREVIEW
   ========================================================================= */

.title-preview-section {
    margin-bottom: 40px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--gd-text);
    margin-bottom: 12px;
}

.auto-title-display {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--gd-primary) 0%, var(--gd-primary-dark) 100%);
    color: white;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    box-shadow: var(--gd-shadow);
}

.date-section {
    margin-bottom: 30px;
}

.date-input {
    max-width: 300px;
}

/* ============================================================================
   GROWTH STAGES
   ========================================================================= */

.growth-stage-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stage-option {
    position: relative;
    padding: 30px 20px;
    background: var(--gd-bg-white);
    border: 3px solid var(--gd-border);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--gd-transition);
}

.stage-option:hover {
    border-color: var(--gd-primary);
    transform: translateY(-4px);
    box-shadow: var(--gd-shadow-lg);
}

.stage-option.selected {
    border-color: var(--gd-primary);
    background: rgba(39, 174, 96, 0.05);
}

.stage-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.stage-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--gd-text);
    display: block;
}

.stage-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: var(--gd-primary);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.stage-option.selected .stage-check {
    display: flex;
}

/* ============================================================================
   PHOTO UPLOAD
   ========================================================================= */

.photo-upload-zone {
    border: 3px dashed var(--gd-border-dark);
    border-radius: 16px;
    padding: 40px 40px;
    text-align: center;
    transition: var(--gd-transition);
    cursor: pointer;
    background: var(--gd-bg-light);
    position: relative;
    min-height: 180px;
    max-width: 500px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-upload-zone:hover {
    border-color: var(--gd-primary);
    background: rgba(39, 174, 96, 0.05);
}

.photo-upload-zone.drag-over {
    border-color: var(--gd-primary);
    background: rgba(39, 174, 96, 0.1);
}

.photo-upload-zone input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.upload-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 18px;
    color: var(--gd-text);
    margin-bottom: 10px;
}

.upload-link {
    color: var(--gd-primary);
    font-weight: 600;
    text-decoration: underline;
}

.upload-hint {
    font-size: 14px;
    color: var(--gd-text-light);
}

.photo-preview-container {
    position: relative;
}

.photo-preview-container img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: var(--gd-shadow);
}

.btn-remove-photo {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    background: var(--gd-danger);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--gd-transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-remove-photo:hover {
    background: var(--gd-danger-dark);
}

.existing-photo-info {
    margin-top: 20px;
    padding: 20px;
    background: var(--gd-bg-light);
    border-radius: 12px;
}

.info-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gd-text-light);
    margin-bottom: 15px;
}

/* Multiple Photos Preview */
.photos-preview-container {
    margin-top: 20px;
}

/* Add More Photos button */
.add-more-photos-wrap {
    margin-top: 16px;
    text-align: center;
}

.btn-add-more-photos {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--gd-bg-light);
    color: var(--gd-primary);
    border: 2px solid var(--gd-primary);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--gd-transition);
}

.btn-add-more-photos:hover {
    background: var(--gd-primary);
    color: #fff;
}

.preview-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.preview-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--gd-shadow);
}

.preview-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-image-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.photo-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.photo-main-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: var(--gd-success);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.photo-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 5px;
    opacity: 1;
}

.photo-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    line-height: 1;
}

.photo-action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.photo-main-btn {
    background: #ffd700;
    color: #000;
}

.photo-main-btn:hover {
    background: #ffed4e;
}

.photo-delete-btn {
    background: #ff4444;
    color: #fff;
}

.photo-delete-btn:hover {
    background: #ff6666;
}

.video-delete-btn {
    background: #ff4444;
    color: #fff;
    font-size: 0;
}

.video-delete-btn:hover {
    background: #ff6666;
}

.video-delete-btn::before {
    content: '✕';
    font-size: 18px;
    line-height: 1;
}

.video-duration-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    padding: 4px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.existing-photos-info {
    margin-top: 20px;
    padding: 20px;
    background: var(--gd-bg-light);
    border-radius: 12px;
}

.existing-photos-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.existing-photo-item {
    position: relative;
}

.existing-photos-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--gd-shadow);
}

.existing-photo-delete-btn {
    background: #ff4444;
    color: #fff;
}

.existing-photo-delete-btn:hover {
    background: #ff6666;
}

.existing-photo-item .photo-actions {
    top: 6px;
    right: 6px;
}

.existing-videos-preview video {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
    box-shadow: var(--gd-shadow);
}

.existing-photo-preview img {
    max-width: 200px;
    border-radius: 8px;
}

/* ============================================================================
   ACTIONS SELECTOR - HORIZONTAL COMPACT LAYOUT
   ========================================================================= */

/* New vertical container for both sections */
.actions-container-vertical {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 20px 0;
}

/* Horizontal sections */
.actions-section-horizontal {
    background: var(--gd-bg-light);
    padding: 16px;
    border-radius: 10px;
}

.section-title-compact {
    font-size: 14px;
    font-weight: 600;
    color: var(--gd-text);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Horizontal flex containers */
.available-actions-horizontal,
.selected-actions-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 50px;
}

.available-actions-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 12px;
}

/* Compact action items */
.action-item-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--gd-bg-white);
    border-radius: 20px;
    transition: var(--gd-transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.available-actions-horizontal .action-item-compact {
    min-height: 118px;
    padding: 16px 14px;
    border-radius: 18px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 10px;
    border-color: rgba(39, 174, 96, 0.1);
    box-shadow: 0 10px 24px rgba(31, 70, 45, 0.05);
}

.action-item-compact:hover {
    border-color: var(--gd-primary);
    box-shadow: var(--gd-shadow);
    transform: translateY(-1px);
}

.action-item-compact .action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(39, 174, 96, 0.1);
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.action-item-compact .action-text {
    font-size: 13px;
    color: var(--gd-text);
    line-height: 1.3;
}

.available-actions-horizontal .action-item-compact .action-text {
    font-size: 13px;
    font-weight: 700;
}

.selected-actions-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-actions-horizontal .action-item-compact {
    padding: 8px 14px;
    border-radius: 20px;
    gap: 8px;
}

.selected-actions-horizontal .action-item-compact .action-icon {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    font-size: 14px;
    background: rgba(39, 174, 96, 0.12);
}

.custom-actions-section {
    border: 1px solid rgba(39, 174, 96, 0.12);
}

.custom-action-entry {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.custom-action-input {
    flex: 1;
    min-width: 0;
}

.custom-action-add-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.custom-action-hint {
    margin: 0;
}

.custom-action-limit-text {
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--gd-text-light);
}

.custom-action-chip .action-icon,
.custom-action-display .action-icon {
    background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 640px) {
    .custom-action-entry {
        flex-direction: column;
        align-items: stretch;
    }

    .custom-action-add-btn {
        width: 100%;
    }
}

/* Selected state */
.action-item-compact.selected {
    background: var(--gd-primary);
    color: white;
    padding-right: 8px;
}

.action-item-compact.selected .action-text {
    color: white;
}

.action-item-compact.selected .action-icon {
    background: rgba(255, 255, 255, 0.2);
}

.action-item-compact.selected:hover {
    border-color: var(--gd-primary-dark);
    background: var(--gd-primary-dark);
}

/* Remove button (X) */
.btn-remove-action {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    font-size: 0;
    font-weight: 700;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transition: var(--gd-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.btn-remove-action::before {
    content: '×';
    font-size: 16px;
    line-height: 1;
}

.btn-remove-action:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Empty state compact */
.empty-state-compact {
    text-align: center;
    padding: 15px 20px;
    color: var(--gd-text-muted);
    font-size: 13px;
    font-style: italic;
    width: 100%;
}

/* Legacy styles - keep for backwards compatibility */
.actions-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.actions-section {
    background: var(--gd-bg-light);
    padding: 20px;
    border-radius: 12px;
    min-height: 400px;
}

.actions-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gd-text);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.available-actions,
.selected-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gd-bg-white);
    border-radius: 8px;
    transition: var(--gd-transition);
}

.action-item:hover {
    box-shadow: var(--gd-shadow);
}

.action-text {
    font-size: 14px;
    color: var(--gd-text);
    flex: 1;
}

.btn-add-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--gd-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--gd-primary);
    color: white;
}

.btn-add-action:hover {
    background: var(--gd-primary-dark);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gd-text-muted);
    font-size: 14px;
}

/* ============================================================================
   METRICS
   ========================================================================= */

.metrics-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.metric-field {
    background: var(--gd-bg-light);
    padding: 24px;
    border-radius: 12px;
}

.metric-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--gd-text);
    margin-bottom: 12px;
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric-input {
    flex: 1;
}

.unit {
    font-size: 16px;
    font-weight: 600;
    color: var(--gd-text-light);
    white-space: nowrap;
}

.metric-previous-value {
    margin: 10px 0 4px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--gd-text-light);
}

/* ============================================================================
   REVIEW SUMMARY (Step 4)
   ========================================================================= */

#step-4-metrics .step-content {
    display: flex;
    flex-direction: column;
}

#step-4-metrics #photos-reference-preview {
    order: 1;
}

#step-4-metrics #videos-reference-preview {
    order: 2;
}

#step-4-metrics #review-summary {
    order: 3;
}

#step-4-metrics .comments-section {
    order: 4;
}

.review-summary-section {
    background: var(--gd-bg-light);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid var(--gd-border);
}

.review-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--gd-text);
    margin: 0 0 16px 0;
}

.review-card {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--gd-border);
    font-size: 14px;
    line-height: 1.4;
}

.review-card:last-child {
    border-bottom: none;
}

.review-card-label {
    color: var(--gd-text-light);
    min-width: 160px;
    flex-shrink: 0;
    font-size: 13px;
}

.review-card-value {
    color: var(--gd-text);
    font-weight: 600;
    word-break: break-word;
}

.review-card-empty {
    color: var(--gd-text-light);
    font-style: italic;
}

.comments-section {
    margin-top: 30px;
}

/* ============================================================================
   PHOTOS REFERENCE PREVIEW (Step 3)
   ========================================================================= */

.photos-reference-section {
    margin: 25px 0;
    padding: 16px;
    background: var(--gd-bg-light);
    border-radius: 10px;
    border: 2px dashed var(--gd-border);
}

.reference-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gd-text);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.photos-reference-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.photos-reference-grid img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--gd-border);
    opacity: 0.9;
    transition: var(--gd-transition);
}

.photos-reference-grid img:hover {
    opacity: 1;
    border-color: var(--gd-primary);
    transform: scale(1.05);
}

.videos-reference-grid video {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--gd-border);
    background: #000;
    opacity: 0.95;
    transition: var(--gd-transition);
}

.videos-reference-grid video:hover {
    opacity: 1;
    border-color: var(--gd-primary);
    transform: scale(1.03);
}

/* ============================================================================
   NAVIGATION BUTTONS
   ========================================================================= */

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--gd-border);
}

.wizard-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--gd-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wizard-btn-next,
.wizard-btn-finish {
    background: var(--gd-primary);
    color: white;
    margin-left: auto;
}

.wizard-btn-next:hover,
.wizard-btn-finish:hover {
    background: var(--gd-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--gd-shadow-lg);
}

.wizard-btn-back {
    background: var(--gd-bg-light);
    color: var(--gd-text);
    border: 2px solid var(--gd-border);
}

.wizard-btn-back:hover {
    background: var(--gd-border);
}

.wizard-btn-secondary {
    background: var(--gd-bg-light);
    color: var(--gd-text);
    border: 2px solid var(--gd-border);
}

/* ============================================================================
   LOADING & MESSAGES
   ========================================================================= */

.wizard-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loading-text {
    font-size: 18px;
    font-weight: 600;
}

.wizard-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    padding: 16px 24px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--gd-shadow-xl);
    z-index: 9998;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.wizard-message.error {
    background: #fee;
    border: 2px solid var(--gd-danger);
    color: var(--gd-danger);
}

.wizard-message.success {
    background: #efe;
    border: 2px solid var(--gd-success);
    color: var(--gd-success);
}

.wizard-message .icon {
    font-size: 24px;
}

.wizard-message p {
    flex: 1;
    margin: 0;
    font-weight: 600;
}

.btn-close-message {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--gd-transition);
}

.btn-close-message:hover {
    opacity: 1;
}

/* ============================================================================
   SINGLE GrowLog - HEADER
   ========================================================================= */

.GrowLog-single-view {
    max-width: 2080px;
    margin: 0 auto;
    padding: 30px 20px;
}

.GrowLog-header {
    margin-bottom: 20px;
}

.header-content {
    background: #f3ecff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: var(--gd-shadow);
    border: 1px solid #e2d5ff;
}

.entry-title {
    font-size: 28px;
    font-weight: 400;
    color: var(--gd-text);
    margin: 0 0 12px 0;
}

.diary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gd-text-light);
}

.meta-item a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--gd-transition);
}

.meta-item a:hover {
    color: var(--gd-primary);
    border-bottom-color: currentColor;
}

.meta-item .icon {
    font-size: 16px;
}

.days-badge {
    padding: 4px 12px;
    background: var(--gd-primary);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.diary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: var(--gd-transition);
}

.btn-edit {
    background: var(--gd-secondary);
    color: white;
}

.btn-edit:hover {
    background: var(--gd-secondary-dark);
    transform: translateY(-2px);
}

.btn-add-update {
    background: var(--gd-primary);
    color: white;
}

.btn-add-update:hover {
    background: var(--gd-primary-dark);
    transform: translateY(-2px);
}

.btn-recap {
    background: linear-gradient(135deg, #0e7a62 0%, #174f68 100%);
    color: white;
}

.btn-recap:hover {
    background: linear-gradient(135deg, #126f59 0%, #143f53 100%);
    transform: translateY(-2px);
}

.growlog-next-step-target.is-setup-next-step {
    position: relative;
    transform-origin: center;
}

.growlog-next-step-target.is-setup-next-step.growlog-next-step-live {
    animation: growlogNextStepPulse 2.2s ease-in-out 3;
}

.growlog-next-step-target.is-setup-next-step.growlog-next-step-live::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    border: 2px solid rgba(39, 174, 96, 0.22);
    animation: growlogNextStepRing 2.2s ease-out 3;
    pointer-events: none;
}

@keyframes growlogNextStepPulse {
    0%,
    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 rgba(39, 174, 96, 0);
    }
    18% {
        transform: translateY(-1px) scale(1.015);
        box-shadow: 0 10px 28px rgba(39, 174, 96, 0.18);
    }
    32% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 rgba(39, 174, 96, 0);
    }
    48% {
        transform: translateY(-3px) scale(1.03);
        box-shadow: 0 14px 34px rgba(39, 174, 96, 0.22);
    }
    64% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 rgba(39, 174, 96, 0);
    }
}

@keyframes growlogNextStepRing {
    0% {
        opacity: 0;
        transform: scale(0.97);
    }
    20% {
        opacity: 0.9;
    }
    100% {
        opacity: 0;
        transform: scale(1.06);
    }
}

/* ============================================================================
   SETUP INFO
   ========================================================================= */

.setup-info-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gd-text);
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Horizontal Compact Layout */
.setup-horizontal {
    display: flex;
    align-items: center;
    gap: 30px;
    background: var(--gd-bg-white);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: var(--gd-shadow);
    flex-wrap: wrap;
}

.setup-device-compact {
    display: flex;
    align-items: center;
    gap: 12px;
}

.device-icon {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
}

.device-name-compact {
    font-size: 15px;
    font-weight: 600;
    color: var(--gd-text);
    max-width: 150px;
}

.setup-crops-compact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 200px;
    flex-wrap: wrap;
}

.crops-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.crop-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--gd-bg-light);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gd-text);
}

.setup-compact-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--gd-text);
    white-space: nowrap;
}

.setup-nutrient-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 22px;
    border: 2px solid #2196f3;
}

.setup-crops-compact > .icon,
.setup-nutrient-compact > .icon {
    display: none;
}

.nutrient-icon {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
    padding: 4px;
}

.nutrient-name-compact {
    font-size: 14px;
    font-weight: 600;
    color: #1976d2;
    white-space: nowrap;
}

.setup-date-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--gd-primary);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.setup-card {
    background: var(--gd-bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--gd-shadow);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gd-text);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.device-display {
    text-align: center;
}

.device-image {
    max-width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
}

.crops-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.crop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gd-border);
}

.crop-item:last-child {
    border-bottom: none;
}

.crop-name {
    font-weight: 600;
    color: var(--gd-text);
}

.crop-quantity {
    color: var(--gd-text-light);
    font-weight: 600;
}

.date-display {
    text-align: center;
}

.date-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gd-primary);
    margin: 0 0 10px 0;
}

.days-count {
    font-size: 16px;
    color: var(--gd-text-light);
}

/* ============================================================================
   PHOTO NAVIGATION BAR
   ========================================================================= */

.updates-photo-nav {
    position: sticky;
    top: 0;
    background: var(--gd-bg-white);
    padding: 10px 20px;
    margin-bottom: 25px;
    box-shadow: var(--gd-shadow);
    z-index: 100;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.updates-photo-nav::after {
    content: none;
}

/* Transparente al hacer scroll */
.updates-photo-nav.scrolled {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.photo-nav-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    align-items: flex-start;
}

.nav-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gd-text);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-count {
    font-size: 12px;
    color: var(--gd-text-light);
    padding: 3px 10px;
    background: var(--gd-bg-light);
    border-radius: 12px;
    margin-left: 26px;
}

.photo-nav-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--gd-border) var(--gd-bg-light);
    flex: 1;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.photo-nav-scroll::-webkit-scrollbar {
    height: 8px;
}

.photo-nav-scroll::-webkit-scrollbar-track {
    background: var(--gd-bg-light);
    border-radius: 4px;
}

.photo-nav-scroll::-webkit-scrollbar-thumb {
    background: var(--gd-border-dark);
    border-radius: 4px;
}

.photo-nav-item {
    flex-shrink: 0;
    width: 90px;
    cursor: pointer;
    transition: var(--gd-transition);
    position: relative;
    scroll-snap-align: start;
}

.photo-nav-item:hover {
    transform: scale(1.05);
}

.photo-nav-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid transparent;
    transition: var(--gd-transition);
    display: block;
}

.photo-nav-item:hover img {
    border-color: var(--gd-primary);
}

.photo-nav-item.is-active {
    transform: translateY(-2px);
}

.photo-nav-item.is-active img {
    border-color: var(--gd-primary);
    box-shadow: 0 10px 22px rgba(39, 174, 96, 0.28);
}

.photo-nav-item.is-active .update-number {
    background: var(--gd-primary-dark);
    box-shadow: 0 6px 14px rgba(39, 174, 96, 0.34);
}

.update-number {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: var(--gd-primary);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* ============================================================================
   CHARTS
   ========================================================================= */

.metrics-charts-section {
    margin-bottom: 30px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.chart-container {
    background: var(--gd-bg-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--gd-shadow);
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gd-text);
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-container canvas {
    max-height: 250px;
}

/* ============================================================================
   TIMELINE
   ========================================================================= */

.updates-timeline-section {
    margin-bottom: 50px;
}

.timeline-container {
    position: relative;
    padding-left: 40px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gd-border);
}

.timeline-update {
    position: relative;
    margin-bottom: 40px;
    --timeline-marker-label-offset: 0px;
}

.timeline-marker {
    position: absolute;
    left: -28px;
    top: 20px;
    width: 16px;
    height: 16px;
    background: var(--gd-primary);
    border: 3px solid var(--gd-bg-white);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--gd-border);
    z-index: 1;
    overflow: visible;
}

.timeline-marker-index {
    position: absolute;
    top: calc(100% + 28px);
    left: 50%;
    transform: translateX(-50%) translateY(var(--timeline-marker-label-offset));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(208, 219, 213, 0.95);
    box-shadow: 0 8px 18px rgba(10, 31, 20, 0.08);
    color: var(--gd-text);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: transform 0.18s linear;
    pointer-events: none;
}

.update-card {
    background: var(--gd-bg-white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--gd-shadow);
    transition: var(--gd-transition);
}

.update-card:hover {
    box-shadow: var(--gd-shadow-lg);
}

.timeline-update.highlight .update-card {
    animation: highlightPulse 0.5s ease-in-out;
}

@keyframes highlightPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3); }
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.update-number-badge {
    display: inline-block;
    padding: 10px 0 2px;
    background: transparent;
    color: var(--gd-text);
    border-radius: 0;
    font-weight: 800;
    font-size: clamp(1.8rem, 3.8vw, 2.6rem);
    line-height: 1;
    letter-spacing: -0.04em;
    text-transform: none;
}

.update-date-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.update-date,
.update-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--gd-text-light);
}

.update-days-ago {
    padding: 4px 12px;
    background: var(--gd-bg-light);
    border-radius: 12px;
    font-size: 13px;
    color: var(--gd-text-light);
    font-weight: 600;
}

.update-stage {
    margin-bottom: 20px;
}

.stage-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}

.stage-badge.stage-germinacion {
    background: rgba(52, 152, 219, 0.15);
    color: var(--gd-secondary);
}

.stage-badge.stage-vegetativo {
    background: rgba(39, 174, 96, 0.15);
    color: var(--gd-success);
}

.stage-badge.stage-floracion {
    background: rgba(243, 156, 18, 0.15);
    color: var(--gd-accent);
}

/* Multiple Photos Gallery - Timeline Display */
.update-photos-gallery {
    margin-bottom: 20px;
}

.update-photos-gallery .main-photo {
    position: relative;
    margin-bottom: 15px;
}

.update-photos-gallery .growlog-cover-action-wrap {
    display: flex;
    justify-content: flex-start;
    margin-top: 4px;
}

.growlog-cover-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-start;
    width: auto;
    border: 1px solid rgba(32, 56, 85, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: rgba(32, 56, 85, 0.88);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--gd-transition);
    box-shadow: 0 4px 12px rgba(14, 30, 37, 0.06);
}

.growlog-cover-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(39, 174, 96, 0.26);
    box-shadow: 0 6px 14px rgba(14, 30, 37, 0.08);
}

.growlog-cover-btn:disabled {
    opacity: 0.75;
    cursor: wait;
    transform: none;
}

.growlog-cover-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.growlog-cover-btn.is-active {
    border-color: rgba(39, 174, 96, 0.45);
    background: rgba(39, 174, 96, 0.1);
    color: var(--gd-success);
}

.update-photos-gallery .main-photo img {
    width: 100%;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--gd-transition);
}

.update-photos-gallery .main-photo img:hover {
    transform: scale(1.02);
    box-shadow: var(--gd-shadow-lg);
}

.update-photos-gallery .photos-count-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
}

.update-photos-gallery .photos-count-badge .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.update-photos-gallery .additional-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.update-photos-gallery .additional-photo-card {
    display: flex;
    flex-direction: column;
}

.update-photos-gallery .additional-photo-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.update-photos-gallery .additional-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--gd-transition);
}

.update-photos-gallery .additional-photo-item:hover img {
    transform: scale(1.1);
}

.update-videos-gallery {
    margin: 18px 0 22px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    max-width: 720px;
}

.update-video-item {
    border-radius: 12px;
    overflow: hidden;
    background: #08110b;
    box-shadow: var(--gd-shadow);
}

.update-video-item video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
}

/* Desktop: compact gallery layout */
@media (min-width: 769px) {
    .update-photos-gallery {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        max-width: 640px;
    }

    .update-photos-gallery .main-photo {
        flex: 0 0 340px;
        width: 340px;
        margin-bottom: 0;
    }

    .update-photos-gallery .main-photo img {
        width: 340px;
        height: 255px;
        object-fit: cover;
        border-radius: 10px;
    }

    .update-photos-gallery .additional-photos-grid {
        flex: 1;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .update-photos-gallery .additional-photo-item {
        aspect-ratio: 1;
        border-radius: 6px;
    }
}

/* Update Extra Info Block (tank level, light height, nutrients) */
.update-extra-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.extra-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.extra-info-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.extra-tank-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}

.extra-info-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.extra-info-label {
    font-size: 0.78rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.extra-info-label.extra-info-muted {
    font-style: italic;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.extra-info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
}

.extra-dose-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.extra-dose-item {
    font-size: 0.85rem;
    color: #2d3748;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    padding: 2px 8px;
}

.extra-dose-item.extra-dose-note {
    background: #fff8e1;
    border-color: #ffe082;
    font-style: italic;
}

/* Backwards compatibility - keep old styles for legacy single photos */
.update-photo {
    margin-bottom: 20px;
}

.update-photo img {
    width: 100%;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--gd-transition);
}

.update-photo img:hover {
    transform: scale(1.02);
    box-shadow: var(--gd-shadow-lg);
}

.update-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--gd-bg-light);
    border-radius: 10px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.metric-item .label {
    color: var(--gd-text-light);
}

.metric-item .value {
    color: var(--gd-text);
    font-weight: 700;
    font-size: 20px;
}

.metric-item .unit {
    color: var(--gd-text-muted);
    font-size: 14px;
}

.update-comments {
    padding: 20px;
    background: var(--gd-bg-light);
    border-radius: 10px;
    margin-bottom: 20px;
}

.update-comments p {
    margin: 0;
    color: var(--gd-text);
    line-height: 1.6;
}

.update-reactions-section {
    margin-bottom: 20px;
}

.hydro-reactions {
    padding: 16px 18px;
    background: #f5efff;
    border: 1px solid #e2d6f7;
    border-radius: 12px;
}

.hydro-reactions-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.hydro-reactions-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gd-text);
}

.hydro-reactions-mobile-toggle {
    display: none;
}

.hydro-reactions-panel {
    display: block;
}

.hydro-reactions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hydro-reactions-received {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
    text-align: right;
}

.hydro-reactions-received-label {
    font-size: 12px;
    color: var(--gd-text-muted);
}

.hydro-reactions-received-value {
    display: none;
}

.hydro-reactions-received-summary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #256b28;
}

.hydro-reactions-received-icon {
    line-height: 1;
}

.hydro-reactions-received-total {
    margin-left: 2px;
}

.hydro-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid #cfe0cf;
    border-radius: 999px;
    background: #fff;
    color: var(--gd-text);
    cursor: pointer;
    transition: var(--gd-transition);
    font: inherit;
}

.hydro-reaction-btn:hover:not(:disabled) {
    border-color: #7fbf7f;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(76, 175, 80, 0.10);
}

.hydro-reaction-btn.is-active {
    background: #eaf8ec;
    border-color: #4CAF50;
    color: #256b28;
}

.hydro-reaction-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.hydro-reaction-emoji {
    font-size: 16px;
    line-height: 1;
}

.hydro-reaction-label {
    font-size: 13px;
    font-weight: 600;
}

.hydro-reaction-count {
    min-width: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef3ee;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.hydro-reaction-btn.is-active .hydro-reaction-count {
    background: #d8efd9;
}

.hydro-reactions-feedback {
    margin-top: 10px;
    font-size: 13px;
    color: #c62828;
}

.hydro-reactions-login-note {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--gd-text-muted);
}

.update-actions {
    margin-bottom: 20px;
}

.actions-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gd-text);
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.actions-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 12px;
}

.update-actions .action-item-display {
    min-height: 118px;
    padding: 16px 14px;
    border-radius: 18px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 10px;
    cursor: default;
    background: var(--gd-bg-white);
    border: 2px solid rgba(39, 174, 96, 0.1);
    box-shadow: 0 10px 24px rgba(31, 70, 45, 0.05);
}

.update-actions .action-item-display:hover {
    transform: none;
    border-color: rgba(39, 174, 96, 0.2);
    box-shadow: 0 10px 24px rgba(31, 70, 45, 0.08);
}

.update-actions .action-item-display .action-text {
    font-size: 13px;
    font-weight: 700;
}

.update-actions .action-item-display .action-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 20px;
    background: rgba(39, 174, 96, 0.1);
}

.update-controls {
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 2px solid var(--gd-border);
}

.btn-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--gd-transition);
}

.btn-edit-update {
    background: var(--gd-secondary);
    color: white;
}

.btn-edit-update:hover {
    background: var(--gd-secondary-dark);
}

.btn-delete-update {
    background: var(--gd-danger);
    color: white;
}

.btn-delete-update:hover {
    background: var(--gd-danger-dark);
}

/* ============================================================================
   FAB BUTTON
   ========================================================================= */

.add-update-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.fab-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    background: var(--gd-primary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: var(--gd-shadow-xl);
    transition: var(--gd-transition);
}

.fab-button:hover {
    background: var(--gd-primary-dark);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.4);
}

/* ============================================================================
   LIGHTBOX
   ========================================================================= */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 36px;
    color: white;
    cursor: pointer;
    transition: var(--gd-transition);
}

.lightbox-close:hover {
    color: var(--gd-primary);
}

/* ============================================================================
   GrowLog LIST
   ========================================================================= */

.GrowLog-list-page {
    width: min(1760px, calc(100vw - 24px));
    max-width: none;
    margin: 0 auto;
    padding: 36px 8px;
}

body.page-template-templates-growlog-list .site.grid-container,
body.page-template-templates-growlog-list-php .site.grid-container,
body.page-template-templates-growlog-list .site-content,
body.page-template-templates-growlog-list-php .site-content,
body.page-template-templates-growlog-list #primary,
body.page-template-templates-growlog-list-php #primary {
    max-width: 100%;
    width: 100%;
}

body.page-template-templates-growlog-list.separate-containers .inside-article,
body.page-template-templates-growlog-list-php.separate-containers .inside-article,
body.page-template-templates-growlog-list .site-main,
body.page-template-templates-growlog-list-php .site-main {
    padding-left: 0;
    padding-right: 0;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header-growlogs {
    position: relative;
    overflow: hidden;
    margin-bottom: 48px;
    padding: 30px 24px;
    border: 1px solid rgba(111, 140, 124, 0.18);
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(168, 222, 193, 0.42), rgba(168, 222, 193, 0) 34%),
        radial-gradient(circle at bottom right, rgba(224, 241, 232, 0.92), rgba(224, 241, 232, 0) 42%),
        linear-gradient(135deg, #f8fcf8 0%, #eff7f0 52%, #e4f0e7 100%);
    box-shadow: 0 20px 44px rgba(53, 85, 67, 0.08);
    text-align: left;
}

.page-header-growlogs::after {
    content: "";
    position: absolute;
    top: -60px;
    right: -40px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(121, 177, 141, 0.12);
    filter: blur(4px);
    pointer-events: none;
}

.page-header-hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
    gap: 28px;
    align-items: stretch;
}

.page-header-copy {
    max-width: 760px;
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(50, 110, 73, 0.1);
    color: #2c6a45;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-title {
    font-size: clamp(36px, 5vw, 54px);
    font-weight: 800;
    color: #1f4230;
    margin: 0 0 14px 0;
    line-height: 0.98;
    letter-spacing: -0.03em;
}

.page-subtitle {
    max-width: 760px;
    font-size: 20px;
    color: #355746;
    margin: 0 0 14px 0;
    line-height: 1.55;
    font-weight: 600;
}

.page-description {
    max-width: 720px;
    margin: 0;
    color: #587162;
    font-size: 15px;
    line-height: 1.75;
}

.page-header-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.page-highlight-pill {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border: 1px solid rgba(68, 108, 83, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #355746;
    font-size: 13px;
    font-weight: 700;
}

.page-header-stats {
    display: grid;
    gap: 14px;
}

.page-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 152px;
    padding: 20px 22px;
    border: 1px solid rgba(73, 112, 88, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 28px rgba(55, 87, 67, 0.07);
    backdrop-filter: blur(8px);
}

.page-stat-label {
    color: #61806f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-stat-value {
    margin: 10px 0 8px;
    color: #214232;
    font-size: 42px;
    line-height: 1;
    font-weight: 800;
}

.page-stat-value-text {
    font-size: 26px;
    line-height: 1.15;
}

.page-stat-note {
    color: #5d7667;
    font-size: 14px;
    line-height: 1.6;
}

.header-actions {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 24px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--gd-primary);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--gd-transition);
}

.btn-primary:hover {
    background: var(--gd-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--gd-shadow-lg);
}

.btn-large {
    font-size: 18px;
    padding: 16px 32px;
}

.btn-create {
    font-size: 16px;
}

/* ============================================================================
   MIS GROWLOGS — Compact list (logged-in user's own diaries)
   ========================================================================= */

.my-growlogs-section {
    margin: 24px 0 0;
}

.my-growlogs-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gd-text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.my-growlogs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.my-growlog-item {
    margin: 0;
}

.my-growlog-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--gd-bg-light);
    text-decoration: none;
    color: var(--gd-text);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--gd-border);
}

.my-growlog-link:hover {
    background: var(--gd-border);
    box-shadow: var(--gd-shadow-sm);
    color: var(--gd-text);
    text-decoration: none;
}

.my-growlog-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gd-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.my-growlog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.my-growlog-thumb-placeholder {
    font-size: 22px;
    line-height: 1;
}

.my-growlog-title-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--gd-text);
    line-height: 1.3;
}

/* ============================================================================
   GROWLOGS GRID
   ========================================================================= */

.GrowLogs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.GrowLog-card {
    background: var(--gd-bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--gd-shadow);
    transition: var(--gd-transition);
}

.GrowLog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--gd-shadow-xl);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-cover {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--gd-transition);
}

.GrowLog-card:hover .card-cover img {
    transform: scale(1.1);
}

.card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gd-primary) 0%, var(--gd-primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 64px;
    opacity: 0.5;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--gd-transition);
}

.GrowLog-card:hover .card-overlay {
    opacity: 1;
}

.overlay-text {
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.card-content {
    padding: 25px;
}

.card-title {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--gd-text);
    margin: 0 0 15px 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.meta-icon {
    font-size: 14px;
    line-height: 1;
}

.meta-item-author {
    background: #eef5ff;
    color: #34527e;
}

.meta-item-updates {
    background: #edf9f1;
    color: #2e6a47;
}

.card-detail-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    margin-bottom: 16px;
}

.detail-label {
    display: block;
    margin-bottom: 6px;
    color: #72907f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-crops,
.card-device {
    font-size: 14px;
    color: var(--gd-text-light);
    margin-bottom: 0;
}

.crops-label {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.crops-text {
    display: block;
    margin-top: 0;
    color: var(--gd-text);
    font-weight: 700;
}

.device-name {
    display: block;
    font-weight: 600;
    color: var(--gd-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-nutrient {
    padding: 14px 16px;
    border: 1px solid rgba(83, 125, 101, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(247, 251, 247, 0.98) 0%, rgba(239, 246, 240, 0.96) 100%);
}

.card-nutrient-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.GrowLog-card-actions {
    padding: 0 25px 25px;
}

.growlog-card-edit-btn {
    width: auto;
}

.card-nutrient-image,
.card-nutrient-fallback {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    flex-shrink: 0;
}

.card-nutrient-image {
    object-fit: cover;
    border: 1px solid rgba(86, 129, 104, 0.14);
    background: #fff;
}

.card-nutrient-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e4f4e8;
    font-size: 18px;
}

.card-nutrient-name {
    color: var(--gd-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

/* ============================================================================
   EMPTY STATES
   ========================================================================= */

.empty-state-container,
.empty-updates-section {
    padding: 80px 20px;
}

.empty-state {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state h2,
.empty-state h3 {
    font-size: 28px;
    color: var(--gd-text);
    margin: 0 0 15px 0;
}

.empty-state p {
    font-size: 16px;
    color: var(--gd-text-light);
    margin: 0 0 30px 0;
}

/* ============================================================================
   PAGINATION
   ========================================================================= */

.pagination {
    text-align: center;
    margin-top: 50px;
}

.pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
}

.pagination li a,
.pagination li span {
    display: block;
    padding: 10px 16px;
    background: var(--gd-bg-white);
    border: 2px solid var(--gd-border);
    border-radius: 8px;
    color: var(--gd-text);
    text-decoration: none;
    font-weight: 600;
    transition: var(--gd-transition);
}

.pagination li a:hover {
    background: var(--gd-primary);
    border-color: var(--gd-primary);
    color: white;
}

.pagination li.current span {
    background: var(--gd-primary);
    border-color: var(--gd-primary);
    color: white;
}

/* ============================================================================
   UTILITY CLASSES
   ========================================================================= */

.icon {
    display: inline-block;
}

/* ============================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 1180px) {
    .GrowLogs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .GrowLog-wizard-container {
        padding: 30px 20px;
    }

    .GrowLog-update-page .update-header-info {
        padding: 22px 20px 24px;
        border-radius: 20px;
    }

    .GrowLog-update-page .back-link {
        margin-bottom: 16px;
        padding: 8px 14px;
        font-size: 12px;
    }

    .GrowLog-update-page .update-header-info h1 {
        font-size: clamp(1.75rem, 7vw, 2.3rem);
    }

    .GrowLog-update-page .diary-subtitle {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .step-header h2 {
        font-size: 24px;
    }

    .wizard-progress {
        padding: 0 5%;
    }

    .wizard-progress .step-text {
        font-size: 12px;
    }

    .device-grid-images {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .crop-entry {
        flex-wrap: wrap;
    }

    .crop-name-field,
    .crop-quantity-field {
        flex: 1 1 100%;
    }

    .photo-upload-zone {
        padding: 40px 20px;
    }

    .actions-container {
        grid-template-columns: 1fr;
    }

    .metrics-container {
        grid-template-columns: 1fr;
    }

    .wizard-navigation {
        flex-direction: column;
    }

    .wizard-btn {
        width: 100%;
        justify-content: center;
    }

    .wizard-btn-next,
    .wizard-btn-finish {
        margin-left: 0;
    }

    .entry-title {
        font-size: 28px;
    }

    .updates-photo-nav {
        display: block;
        position: sticky;
        top: 0;
        padding: 12px 0 14px 12px;
        margin-bottom: 20px;
        border-radius: 18px;
        overflow: hidden;
    }

    .photo-nav-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 0;
        padding: 0 14px 10px 0;
    }

    .nav-title {
        font-size: 15px;
        font-weight: 700;
        min-width: 0;
    }

    .nav-count {
        margin-left: 0;
        padding: 4px 10px;
        font-size: 11px;
        white-space: nowrap;
    }

    .photo-nav-scroll {
        gap: 10px;
        padding: 0 40px 0 0;
        margin: 0;
        scrollbar-width: none;
    }

    .photo-nav-scroll::-webkit-scrollbar {
        display: none;
    }

    .photo-nav-item {
        width: 84px;
    }

    .photo-nav-item img {
        width: 84px;
        height: 84px;
        border-radius: 10px;
    }

    .update-number {
        top: 6px;
        padding: 4px 9px;
        font-size: 12px;
    }

    .updates-photo-nav.has-overflow-right:not(.is-scroll-end)::after {
        content: '›';
        position: absolute;
        right: 8px;
        bottom: 14px;
        width: 34px;
        height: 84px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.94) 38%, rgba(255,255,255,1) 100%);
        color: #8ea4b5;
        font-size: 30px;
        font-weight: 700;
        pointer-events: none;
        text-shadow: 0 1px 0 rgba(255,255,255,0.75);
    }

    .header-content {
        padding: 30px 20px;
    }

    .setup-grid {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .timeline-container {
        padding-left: 30px;
    }

    .timeline-marker {
        left: -23px;
    }

    .timeline-marker-index {
        min-width: 38px;
        padding: 4px 7px;
        font-size: 11px;
    }

    .hydro-reactions {
        padding: 14px;
    }

    .hydro-reactions-header {
        margin-bottom: 10px;
    }

    .hydro-reactions-mobile-toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
        border: 1px solid #d7c9f2;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.92);
        color: var(--gd-text);
        cursor: pointer;
        font: inherit;
        text-align: left;
    }

    .hydro-reactions-mobile-toggle-main {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .hydro-reactions-mobile-toggle-emoji {
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #f5efff;
        font-size: 18px;
        flex-shrink: 0;
    }

    .hydro-reactions-mobile-toggle-copy {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .hydro-reactions-mobile-toggle-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--gd-text);
    }

    .hydro-reactions-mobile-toggle-hint {
        font-size: 12px;
        color: var(--gd-text-muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hydro-reactions-mobile-toggle-arrow {
        flex-shrink: 0;
        font-size: 24px;
        line-height: 1;
        color: #8f78c7;
        transition: transform 0.22s ease;
    }

    .update-reactions-section.is-mobile-reactions-open .hydro-reactions-mobile-toggle-arrow {
        transform: rotate(45deg);
    }

    .hydro-reactions-panel {
        display: none;
        margin-top: 12px;
    }

    .update-reactions-section.is-mobile-reactions-open .hydro-reactions-panel {
        display: block;
    }

    .hydro-reactions-list {
        gap: 8px;
    }

    .hydro-reaction-btn {
        width: 100%;
        justify-content: space-between;
        padding: 10px 12px;
    }

    .hydro-reaction-label {
        flex: 1;
    }

    .hydro-reactions-received {
        justify-content: space-between;
        align-items: center;
        text-align: left;
        flex-wrap: wrap;
    }

    .update-card {
        padding: 20px;
    }

    .update-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .add-update-fab {
        bottom: 20px;
        right: 20px;
    }

    .fab-button .text {
        display: none;
    }

    .GrowLogs-grid {
        grid-template-columns: 1fr;
    }

    .page-header-growlogs {
        padding: 28px 22px;
        border-radius: 24px;
    }

    .page-header-hero {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .page-header-stats {
        grid-template-columns: 1fr;
    }

    .page-description {
        font-size: 14px;
    }

    .card-detail-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .header-actions {
        justify-content: stretch;
    }

    .header-actions .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .page-title {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .GrowLog-wizard-page,
    .GrowLog-update-page {
        padding: 20px 10px;
    }

    .GrowLog-wizard-container {
        padding: 20px 15px;
    }

    .wizard-progress .step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .device-grid-images {
        grid-template-columns: 1fr;
    }

    .photo-upload-zone {
        aspect-ratio: auto;
        min-height: 300px;
    }

    .GrowLog-single-view {
        padding: 20px 10px;
    }

    .update-metrics {
        flex-direction: column;
    }
}

/* ============================================================================
   PRINT STYLES
   ========================================================================= */

/* ============================================================================
   TARJETA "OTRO" PARA DISPOSITIVOS
   ========================================================================= */

.device-card-other {
    cursor: pointer;
    opacity: 0.85;
    transition: all 0.3s ease;
}

.device-card-other:hover {
    opacity: 1;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.device-card-other .device-placeholder {
    font-size: 4em;
    filter: grayscale(20%);
}

.device-card-other.selected {
    border-color: var(--gd-primary);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
    opacity: 1;
}

.device-card-other .device-name {
    font-weight: 600;
    color: var(--gd-text);
}

/* ============================================================================
   AUTOCOMPLETADO DE CULTIVOS
   ========================================================================= */

.crop-autocomplete-suggestions {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid var(--gd-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: var(--gd-shadow);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
    margin-top: -8px;
}

.crop-autocomplete-suggestions .autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--gd-bg-light);
}

.crop-autocomplete-suggestions .autocomplete-item:hover,
.crop-autocomplete-suggestions .autocomplete-item.active {
    background-color: #e8f5e9;
    color: var(--gd-primary);
}

.crop-autocomplete-suggestions .autocomplete-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

/* Ajustar posicionamiento del campo */
.crop-name-field {
    position: relative;
}

/* ============================================================================
   MEDIA QUERIES - PRINT
   ========================================================================= */

@media print {
    .wizard-navigation,
    .diary-actions,
    .add-update-fab,
    .update-controls,
    .updates-photo-nav {
        display: none !important;
    }

    .GrowLog-wizard-container,
    .update-card,
    .setup-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Additional width for GrowLog single view */
body #primary.GrowLog-single-view {
    max-width: 2080px !important;
    width: 100%;
}

body #primary.GrowLog-single-view .site-main {
    max-width: none;
    width: 100%;
}

/* ============================================================================
   LEVEL SOLUTION SELECTOR (Step 1 - Update Wizard)
   ========================================================================= */

.level-solution-section {
    margin: 0 0 10px 0;
    text-align: center;
}

/* Flex row: image on left, selector on right */
.level-solution-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.tank-image-container {
    flex-shrink: 0;
}

.tank-image-container img {
    width: 120px;
    height: auto;
    border-radius: 8px;
    display: block;
    transition: opacity 0.3s ease;
}

.level-solution-selector {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: var(--gd-bg-light);
    border: 2px solid var(--gd-border);
    border-radius: 12px;
    padding: 12px 24px;
    margin: 0 auto;
}

.level-display {
    font-size: 22px;
    font-weight: 700;
    color: var(--gd-text);
    min-width: 110px;
    text-align: center;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.level-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--gd-primary);
    background: transparent;
    color: var(--gd-primary);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
    padding: 0;
}

.level-btn:hover:not(:disabled) {
    background: var(--gd-primary);
    color: #fff;
    transform: scale(1.1);
}

.level-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.level-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: var(--gd-border);
    color: var(--gd-text-light);
    background: transparent;
    transform: none;
}

@media (max-width: 480px) {
    .level-solution-layout {
        flex-direction: column;
        gap: 16px;
    }

    .tank-image-container img {
        width: 90px;
    }

    .level-solution-selector {
        gap: 12px;
        padding: 10px 16px;
    }

    .level-display {
        font-size: 18px;
        min-width: 90px;
    }

    .level-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* ============================================================================
   LIGHT HEIGHT SLIDER (Step 1 - Update Wizard)
   ========================================================================= */

.light-height-section {
    margin: 0 0 10px 0;
    text-align: center;
    background: var(--gd-bg-light);
    border-radius: 12px;
    padding: 20px;
}

/* Outer flex row: composite image on left, widget on right */
.light-height-outer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.light-height-widget {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    background: var(--gd-bg-light);
    border: 2px solid var(--gd-border);
    border-radius: 12px;
    padding: 20px 28px;
}

/* Composite image: base (fixed) + panel (moves vertically via JS bottom)
   BASE_HEIGHT=105, MAX_GAP=90, panel_height≈35 → container = 105+90+35 = 230px */
.light-height-visual {
    position: relative;
    flex-shrink: 0;
    height: 230px;
    width: 240px;
}

.lh-base-img {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 240px;
    height: auto;
    display: block;
}

.lh-panel-img {
    position: absolute;
    left: 0;
    width: 240px;
    height: auto;
    display: block;
    transition: bottom 0.15s ease;
}

@media (max-width: 480px) {
    .light-height-visual {
        height: 175px;
        width: 180px;
    }

    .lh-base-img,
    .lh-panel-img {
        width: 180px;
    }
}

/* Slider column: top label → slider → bottom label */
.light-height-slider-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.slider-limit-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gd-text-light);
    white-space: nowrap;
}

/* Vertical range input — cross-browser approach */
.light-height-slider {
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    writing-mode: vertical-lr;
    direction: rtl;          /* low value at bottom, high at top */
    width: 28px;
    height: 200px;
    cursor: pointer;
    accent-color: var(--gd-primary);
    background: transparent;
    padding: 0;
    margin: 0;
}

/* Firefox: orient="vertical" is enough, but we reinforce with writing-mode */
.light-height-slider::-moz-range-track {
    width: 6px;
    background: var(--gd-border);
    border-radius: 3px;
}

.light-height-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gd-primary);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
}

.light-height-slider::-webkit-slider-runnable-track {
    width: 6px;
    background: var(--gd-border);
    border-radius: 3px;
}

.light-height-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gd-primary);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    margin-top: -8px; /* centres thumb on track in webkit */
}

/* Value display column */
.light-height-value-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.light-height-value-display #light-height-value-text {
    font-size: 36px;
    font-weight: 700;
    color: var(--gd-text);
    line-height: 1;
    min-width: 52px;
    text-align: center;
    transition: color 0.15s ease;
}

.light-height-value-display .unit {
    font-size: 16px;
    font-weight: 600;
    color: var(--gd-text-light);
}

@media (max-width: 480px) {
    .light-height-widget {
        gap: 16px;
        padding: 16px 20px;
    }

    .light-height-slider {
        height: 160px;
    }

    .light-height-value-display #light-height-value-text {
        font-size: 28px;
    }
}

/* ============================================================================
   NUTRIENT DOSE BLOCK (Step 2 - Update Wizard)
   ========================================================================= */

/* Nutrient image + name header */
.nutrient-image-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}

.nutrient-thumb {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 10px;
    border: 2px solid var(--gd-border);
    background: var(--gd-bg-white);
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.nutrient-name-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--gd-text);
    text-align: center;
}

/* "No tengo la medición" checkbox — per metric field */
.no-measurement-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    cursor: pointer;
    user-select: none;
}

.no-measurement-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--gd-primary);
    flex-shrink: 0;
}

.no-measurement-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--gd-text-light);
}

/* Disabled state for individual metric field */
.metric-field-disabled .input-with-unit {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(60%);
    transition: opacity 0.2s ease, filter 0.2s ease;
}

/* "No agregué nutrientes" checkbox */
.no-nutrients-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    cursor: pointer;
    user-select: none;
}

.no-nutrients-label input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--gd-primary);
    flex-shrink: 0;
}

.no-nutrients-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--gd-text);
}

/* Disabled state when "no nutrients" is checked */
.dose-fields-disabled {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(60%);
    transition: opacity 0.2s ease, filter 0.2s ease;
}

/* Dose fields grid */
.dose-fields-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.dose-field {
    background: var(--gd-bg-light);
    border-radius: 12px;
    padding: 20px;
}

.dose-field .metric-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--gd-text);
    margin-bottom: 10px;
    display: block;
}

.dose-input {
    width: 100%;
}

/* Fallback message when no nutrient is configured */
.no-nutrient-msg {
    text-align: center;
    color: var(--gd-text-light);
    font-size: 15px;
    padding: 40px 20px;
    background: var(--gd-bg-light);
    border-radius: 12px;
    border: 2px dashed var(--gd-border);
}

@media (max-width: 480px) {
    .dose-fields-container {
        grid-template-columns: 1fr;
    }

    .nutrient-thumb {
        width: 64px;
        height: 64px;
    }
}

/* =============================================================================
   PER-UPDATE COMMENTS
   ============================================================================= */

.update-comments-section {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 12px 12px;
    padding: 20px 24px;
    margin-top: 0;
}

/* Comment list */
.update-comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

/* Single comment item */
.update-comment-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.update-comment-avatar-wrap {
    flex-shrink: 0;
}

.update-comment-avatar {
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    object-fit: cover;
    display: block;
}

.update-comment-bubble {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 10px 14px;
    flex: 1;
    min-width: 0;
}

.update-comment-item.targeted .update-comment-bubble {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.18);
    background: #f3fff5;
}

.update-comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.update-comment-author {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2d3748;
    text-decoration: none;
}

.update-comment-author:hover {
    color: #4CAF50;
}

.update-comment-date {
    font-size: 0.75rem;
    color: #adb5bd;
}

.update-comment-text {
    font-size: 0.88rem;
    color: #4a5568;
    line-height: 1.6;
    word-break: break-word;
}

/* Comment form */
.update-comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.update-comment-login-note {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.update-comment-login-note a {
    color: var(--gd-primary);
    font-weight: 700;
    text-decoration: none;
}

.update-comment-login-note a:hover {
    text-decoration: underline;
}

.update-comment-guest-fields {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.update-comment-input {
    flex: 1;
    min-width: 140px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #2d3748;
    background: #fff;
    transition: border-color 0.2s;
    font-family: inherit;
}

.update-comment-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.1);
}

.update-comment-input-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.update-comment-form-avatar {
    padding-top: 2px;
}

.update-comment-textarea {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #2d3748;
    background: #fff;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.2s;
}

.update-comment-textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.1);
}

.update-comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.update-comment-error {
    font-size: 0.82rem;
    color: #e53935;
    flex: 1;
}

.update-comment-submit {
    padding: 7px 18px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}

.update-comment-submit:hover:not(:disabled) {
    background: #388e3c;
    transform: translateY(-1px);
}

.update-comment-submit:disabled {
    background: #b0bec5;
    cursor: not-allowed;
}

/* ── Reply button ─────────────────────────────────────────────────────── */
.update-comment-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 3px 10px;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: inherit;
    line-height: 1.4;
}

.update-comment-reply-btn:hover {
    background: #f0fdf4;
    color: #388e3c;
    border-color: #a5d6a7;
}

/* ── Inline reply form wrapper ────────────────────────────────────────── */
.update-reply-form-wrap {
    margin-top: 8px;
}

.update-reply-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.update-reply-form-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.update-reply-textarea {
    min-height: 48px;
    font-size: 0.85rem;
}

.update-reply-form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.update-reply-cancel-btn {
    padding: 5px 12px;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #6c757d;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.update-reply-cancel-btn:hover {
    background: #f8f9fa;
}

.update-reply-submit {
    padding: 5px 14px;
    font-size: 0.82rem;
}

/* ── Replies container ────────────────────────────────────────────────── */
.update-comment-replies {
    margin-top: 6px;
    margin-left: 44px;          /* indent under parent avatar */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.update-comment-replies .update-comment-replies {
    margin-left: 24px;
}

/* ── Reply item (indented) ────────────────────────────────────────────── */
.update-comment-reply {
    position: relative;
}

.update-comment-reply::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 14px;
    width: 14px;
    height: 1px;
    background: #dee2e6;
}

.update-comment-reply .update-comment-bubble {
    background: #f8fffe;
    border-color: #c8e6c9;
}

.update-comment-depth-3 .update-comment-bubble,
.update-comment-depth-4 .update-comment-bubble {
    background: #f4fbf7;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .update-comments-section {
        padding: 16px;
    }

    .update-comment-guest-fields {
        flex-direction: column;
    }

    .update-comment-input-row {
        flex-direction: column;
    }

    .update-comment-form-avatar {
        display: none;
    }

    .update-comment-replies {
        margin-left: 28px;
    }

    .update-comment-replies .update-comment-replies {
        margin-left: 12px;
    }
}
