/**
 * Dashboard Index - Stiluri pentru layout compact
 * CDM - Cloud Delivery Manager
 */

/* ========================================
   DASHBOARD HEADER - salut personalizat
   ======================================== */
.dashboard-header {
    padding: 1.5rem 0 1rem;
}

.dashboard-greeting {
    font-size: 1.75rem;
    font-weight: 300;
    margin: 0;
    color: #e9ecef;
}

.dashboard-greeting strong {
    font-weight: 600;
    color: #fff;
}

.greeting-wave {
    display: inline-block;
    animation: wave 2s ease-in-out infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(14deg);
    }
    20% {
        transform: rotate(-8deg);
    }
    30% {
        transform: rotate(14deg);
    }
    40% {
        transform: rotate(-4deg);
    }
    50% {
        transform: rotate(10deg);
    }
    60%, 100% {
        transform: rotate(0deg);
    }
}

.dashboard-subtitle {
    font-size: 0.9rem;
    color: #adb5bd;
    margin: 0.25rem 0 0;
}

.dashboard-subtitle i {
    color: #17a2b8;
}

/* Light mode overrides */
body:not(.dark-mode) .dashboard-greeting {
    color: #495057;
}

body:not(.dark-mode) .dashboard-greeting strong {
    color: #212529;
}

body:not(.dark-mode) .dashboard-subtitle {
    color: #6c757d;
}

/* ========================================
   SIDEBAR CARDS - carduri funcționalități
   ======================================== */

.sidebar-card {
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-card-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.sidebar-card-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.sidebar-card-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6610f2 100%);
}

.sidebar-card-primary {
    background: linear-gradient(135deg, #007bff 0%, #6f42c1 100%);
}

.sidebar-card-danger {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.sidebar-card .card-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    opacity: 0.25;
}

.sidebar-card h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sidebar-card p {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    line-height: 1.3;
}

.sidebar-card .card-link {
    font-size: 0.8rem;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.sidebar-card .card-link:hover {
    text-decoration: underline;
}

.sidebar-card .status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.25);
    margin-bottom: 0.35rem;
}

/* ========================================
   TIMELINE COMPACT - versiuni
   ======================================== */
.timeline-compact {
    padding-left: 0;
}

.timeline-compact .timeline {
    margin: 0;
}

.timeline-compact .time-label > span {
    font-size: 0.75rem;
    padding: 3px 10px;
}

.timeline-compact .timeline-item {
    padding: 8px 12px;
    margin-bottom: 0;
}

.timeline-compact .timeline-header {
    font-size: 0.875rem;
    padding: 0;
    margin-bottom: 4px;
    border-bottom: none;
}

.timeline-compact .timeline-body {
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 0;
}

.timeline-compact > .timeline > div > i {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
    line-height: 24px;
}

/* Versiuni ascunse */
.versions-hidden {
    display: none;
}

.versions-hidden.show {
    display: block;
}

/* Buton expand versiuni */
.btn-expand-versions {
    border: 2px dashed #dee2e6;
    background: transparent;
    color: #6c757d;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-expand-versions:hover {
    border-color: #17a2b8;
    color: #17a2b8;
    background: rgba(23, 162, 184, 0.05);
}

.btn-expand-versions i {
    transition: transform 0.3s ease;
}

.btn-expand-versions.expanded {
    border-color: #6c757d;
    border-style: solid;
    background: #f8f9fa;
}

.btn-expand-versions.expanded:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.05);
}

/* ========================================
   ALERTS COMPACTE
   ======================================== */
.dashboard-alerts .info-box {
    min-height: auto;
    margin-bottom: 0.75rem;
}

.dashboard-alerts .info-box-content {
    padding: 10px;
}

.dashboard-alerts .info-box-text {
    font-size: 0.8rem;
}

/* ========================================
   FEATURES ROW - carduri orizontale compacte
   ======================================== */
.features-row .sidebar-card {
    min-height: 110px;
    padding: 0.75rem;
}

.features-row .sidebar-card h5 {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.features-row .sidebar-card p {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    min-height: 2rem;
    line-height: 1.3;
}

.features-row .sidebar-card .card-icon {
    font-size: 2rem;
    opacity: 0.2;
}

.features-row .sidebar-card .card-link {
    font-size: 0.75rem;
}

@media (max-width: 1200px) {
    .features-row {
        flex-wrap: wrap;
    }

    .features-row .col {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

@media (max-width: 768px) {
    .features-row .col {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 576px) {
    .features-row .col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ========================================
   NEWS CARDS - carduri noutăți
   ======================================== */
.news-card {
    border-radius: 0.5rem;
    padding: 1rem;
    background: var(--at-bg-card, #fff);
    border-left: 4px solid #17a2b8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.news-card-success {
    border-left-color: #28a745;
}

.news-card-info {
    border-left-color: #17a2b8;
}

.news-card-primary {
    border-left-color: #007bff;
}

.news-card-warning {
    border-left-color: #ffc107;
}

.news-card-danger {
    border-left-color: #dc3545;
}

.news-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.news-card-success .news-card-icon {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.news-card-info .news-card-icon {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
}

.news-card-primary .news-card-icon {
    background: rgba(0, 123, 255, 0.15);
    color: #007bff;
}

.news-card-warning .news-card-icon {
    background: rgba(255, 193, 7, 0.15);
    color: #d39e00;
}

.news-card-danger .news-card-icon {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.news-card-date {
    font-size: 0.7rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.news-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #343a40;
    line-height: 1.3;
}

.news-card-body {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.4;
    max-height: 120px;
    overflow: hidden;
}

.news-card-body b {
    color: #495057;
}

/* Dark mode news cards - folosește variabile CSS din admin-theme.css */
.dark-mode .news-card,
body.dark-mode .news-card {
    background: var(--at-bg-card, #1e1e1e);
    border-left-color: #444;
}

.dark-mode .news-card-title,
body.dark-mode .news-card-title {
    color: var(--at-text-primary, #f8f9fa);
}

.dark-mode .news-card-body,
body.dark-mode .news-card-body {
    color: var(--at-text-secondary, #adb5bd);
}

.dark-mode .news-card-body b,
body.dark-mode .news-card-body b {
    color: var(--at-text-primary, #e9ecef);
}

.dark-mode .news-card-date,
body.dark-mode .news-card-date {
    color: var(--at-text-muted, #9ca3af);
}

/* ========================================
   CARD SECTION HEADER
   ======================================== */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #17a2b8;
}

.section-header i {
    color: #17a2b8;
}

.section-header h5 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #17a2b8;
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */
.dark-mode .section-header {
    border-bottom-color: #3498db;
}

.dark-mode .section-header i,
.dark-mode .section-header h5 {
    color: #3498db;
}

.dark-mode .btn-expand-versions {
    border-color: #6c757d;
    color: #adb5bd;
}

.dark-mode .btn-expand-versions:hover {
    border-color: #3498db;
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.dark-mode .btn-expand-versions.expanded {
    border-color: #adb5bd;
    background: #2c3237;
}

.dark-mode .btn-expand-versions.expanded:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

/* ========================================
   QUOTE BOX - Citat pe mai multe linii
   ======================================== */
.quote-box {
    max-width: 500px;
    font-size: 0.8rem;
    color: #adb5bd;
    line-height: 1.5;
    text-align: right;
}

.quote-box-icon {
    color: #17a2b8;
    font-size: 0.75rem;
    margin-right: 0.35rem;
    opacity: 0.8;
}

.quote-box-text {
    font-style: italic;
}

.quote-box-text::before {
    content: '„';
    color: #17a2b8;
    font-weight: 600;
}

.quote-box-text::after {
    content: '"';
    color: #17a2b8;
    font-weight: 600;
}

.quote-box-author {
    display: block;
    font-weight: 600;
    color: #6f42c1;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Quote box dark mode */
.dark-mode .quote-box {
    color: #9ca3af;
}

.dark-mode .quote-box-icon,
.dark-mode .quote-box-text::before,
.dark-mode .quote-box-text::after {
    color: #3498db;
}

.dark-mode .quote-box-author {
    color: #a78bfa;
}

@media (max-width: 1200px) {
    .quote-box {
        max-width: 400px;
        font-size: 0.75rem;
    }
}

@media (max-width: 992px) {
    .quote-box {
        display: none;
    }
}

/* ========================================
   MOBILE QUOTE BOX & VERSION BADGES
   ======================================== */
.quote-box-mobile {
    font-size: 0.75rem;
    color: #adb5bd;
    line-height: 1.4;
    padding: 0.5rem 0.75rem;
    background: rgba(23, 162, 184, 0.08);
    border-radius: 0.375rem;
    border-left: 3px solid #17a2b8;
    margin-bottom: 0.5rem;
}

.quote-box-mobile i {
    color: #17a2b8;
    font-size: 0.65rem;
    margin-right: 0.25rem;
    opacity: 0.7;
}

.quote-box-mobile .quote-text {
    font-style: italic;
}

.quote-box-mobile .quote-text::before {
    content: '„';
    color: #17a2b8;
}

.quote-box-mobile .quote-text::after {
    content: '"';
    color: #17a2b8;
}

.quote-box-mobile .quote-author {
    display: block;
    font-weight: 600;
    color: #6f42c1;
    font-size: 0.7rem;
    margin-top: 0.25rem;
}

.version-badges-mobile {
    display: flex;
    gap: 0.5rem;
}

.version-badges-mobile .badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.5rem;
}

/* Dark mode pentru mobile */
.dark-mode .quote-box-mobile {
    background: rgba(52, 152, 219, 0.1);
    color: #9ca3af;
    border-left-color: #3498db;
}

.dark-mode .quote-box-mobile i,
.dark-mode .quote-box-mobile .quote-text::before,
.dark-mode .quote-box-mobile .quote-text::after {
    color: #3498db;
}

.dark-mode .quote-box-mobile .quote-author {
    color: #a78bfa;
}