/* =====================================
   BASE
===================================== */

html,
body {
    min-height: 100%;
    margin: 0;
}

html {
    background: radial-gradient(
        circle at top center,
        #3a3a3a 0%,
        #232323 40%,
        #141414 100%
    );
}

body {
    font-family: Arial, sans-serif;
    color: #eee;
    padding: 40px;
}

.container {
    max-width: 1600px;
    margin: auto;
}

.nas-name {
    font-size: 26px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 25px;
}


/* =====================================
   STATUS BAR
===================================== */

.status-wrapper {
    text-align: center;
}

.status {
    display: inline-block;
    font-size: 18px;
    font-weight: bold;

    padding: 10px 26px;
    margin: 10px 10px 30px 10px;

    border-radius: 10px;
    color: #fff;

    position: relative;
    overflow: hidden;

    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.25),
        inset 0 -4px 8px rgba(0,0,0,0.4),
        0 6px 16px rgba(0,0,0,0.6);

    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.status::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;

    height: 50%;

    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.45),
        rgba(255,255,255,0.05)
    );

    border-radius: 10px 10px 0 0;
    pointer-events: none;
}


/* =====================================
   DASHBOARD GRID
===================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 60px;
    margin-top: 30px;
    align-items: stretch;
}


/* =====================================
   CARD
===================================== */

.card {
    background: #222;
    padding: 22px;
    border-radius: 12px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.6);

    display: flex;
    flex-direction: column;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 18px 40px rgba(0,0,0,0.8);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0;
}

.small {
    font-size: 0.9em;
    color: #aaa;
    margin-top: 12px;
}


/* =====================================
   ROWS
===================================== */

.row {
    display: grid;
    grid-template-columns: 200px 15px 1fr;
    margin-bottom: 8px;
    align-items: center;
}

.label {
    font-weight: bold;
}

.separator {
    text-align: center;
}

.exit-row {
    margin-bottom: 20px;
}


/* =====================================
   PROGRESS BARS
===================================== */

.progress {
    background: #333;
    border-radius: 20px;
    overflow: hidden;

    height: 30px;
    margin: 15px 0;
}

.progress-bar {
    height: 100%;
    width: 0;

    position: relative;
    overflow: hidden;

    border-radius: 20px;

    transition: width 0.9s ease-in-out;

    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.15),
        inset 0 -3px 6px rgba(0,0,0,0.4);
}

.progress-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    height: 50%;

    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.35),
        rgba(255,255,255,0.05)
    );

    border-radius: 20px 20px 0 0;
}


/* =====================================
   RAID
===================================== */

.raid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
	grid-column: span 2;
}

.raid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 18px;
    font-weight: bold;

    margin-bottom: 12px;
}

.raid-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 20px;
}

.card-raid .row {
    grid-template-columns: 130px 15px 1fr;
}

.card-raid .row div:last-child {
    white-space: nowrap;
}


/* =====================================
   STATUS DOT
===================================== */

.status-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    position: relative;
}

.status-dot.ok { background: #27ae60; }
.status-dot.warning { background: #f39c12; }
.status-dot.critical { background: #c0392b; }

.status-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: pulse 2.4s ease-out infinite;
    opacity: 0.55;
}

@keyframes pulse {

    0% {
        transform: scale(1);
        opacity: 0.55;
    }

    60% {
        transform: scale(2.6);
        opacity: 0;
    }

    100% {
        transform: scale(2.6);
        opacity: 0;
    }
}


/* =====================================
   LOG LINK
===================================== */

.log-link,
.log-link:visited {
    color: #4da6ff;
    text-decoration: none;
}

.log-link:hover,
.log-link:focus {
    text-decoration: underline;
}

.log-link:active {
    color: #4da6ff;
}


/* =====================================
   BACKUPS
===================================== */

.card-backups-overall {
    margin-top: 40px;
}

.backup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 30px;
}

.backup-subheader {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 18px;
    font-weight: bold;

    margin-bottom: 15px;
}

.backup-subheader .status-dot {
    margin-right: 8px;
}

.no-backups {
    padding: 20px;
    background: #252525;
    border-radius: 10px;
    color: #bbb;
    font-weight: 500;
}

.backup-empty-icon{
    font-size:20px;
    margin-right:6px;
}
/* =====================================
   UPDATE STATUS
===================================== */

.update-date.ok { color: #27ae60; font-weight: 600; }
.update-date.warning { color: #f39c12; font-weight: 600; }
.update-date.critical { color: #c0392b; font-weight: 600; }


/* =====================================
   CARD DIVIDER
===================================== */

.card hr {
    border: none;
    height: 1px;
    margin: 18px 0;

    background: linear-gradient(
        to right,
        transparent,
        #555 20%,
        #555 80%,
        transparent
    );
}


/* =====================================
   DISK GRID (stabil)
===================================== */

:root {
    --disk-grid: 70px 90px minmax(140px,1fr) 110px 120px;
}

.disk-header,
.disk-row {
    display: grid;
    grid-template-columns: var(--disk-grid);
    gap: 10px;
}

.disk-header {
    font-size: 13px;
    font-weight: 600;
    color: #9aa0a6;

    margin-top: 8px;
    margin-bottom: 4px;
}

.disk-row {
    align-items: center;
    font-size: 14px;
    margin-top: 6px;
}

.disk-model {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.disk-temp,
.disk-smart {
    display: flex;
    align-items: center;
    gap: 6px;
}
	
	/* =====================================
   DISK GRID RESPONSIVE
===================================== */

@media (max-width: 1250px) {

    :root {
        --disk-grid: 60px 80px 110px 120px;
    }

    .disk-header div:nth-child(3),
    .disk-row div:nth-child(3) {
        display: none;
    }

}
	
/* =====================================
   RESPONSIVE DISKS
===================================== */

@media (max-width: 1500px) {

    .disk-header,
    .disk-row {
        grid-template-columns: 60px 80px 100px 100px;
    }

    .disk-model {
        display: none;
    }

    .disk-header div:nth-child(3) {
        display: none;
    }

}

/* =====================================
   TEMPERATURE DOT
===================================== */

.temp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    margin-left: 2px;
}

.temp-dot.ok { background: #27ae60; }
.temp-dot.warning { background: #f39c12; }
.temp-dot.critical { background: #c0392b; }


/* =====================================
   INFO ICON
===================================== */

.disk-info {
    color: #4da6ff;
    font-size: 14px;
    margin-left: 6px;

    cursor: help;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    line-height: 1;
}

.disk-empty {
    display: block;
    padding-top: 4px;
}



/* =====================================
   VOLUMES
===================================== */

.info-box {
    background: #252525;
    padding: 15px;
    border-radius: 10px;

    box-shadow: inset 0 0 0 1px #333;

    margin-top: 14px;

    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.volume-box .row {
    margin-bottom: 6px;
}

.ups-gap {
    margin-top: 18px;
}

.card-raid {
    grid-column: 1 / -1;
}

/* =====================================
   RESPONSIVE DASHBOARD
===================================== */

@media (max-width: 1100px) {

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

}
	
