﻿/*camera*/
.camera-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: #000;
}

.camera-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.camera-single {
    max-width: 1200px;
    margin: auto;
}

.camera-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.camera-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.camera-caption {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #444;
}

/*dashboard*/

.dashboard-header {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: url('/images/farm-bg.png') center/cover no-repeat;
    color: #fff;
    min-height: 240px;
    display: flex;
    align-items: center;
    padding: 8px;
}

.dashboard-header .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.75) 100%);
    z-index: 1;
}

.dashboard-header .header-content {
    position: relative;
    z-index: 2;
}

.header-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.header-subtitle {
    font-size: 1.125rem;
    margin: 4px 0 16px;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.mud-input-root-panel .mud-input-root {
    color: #fff !important;
}

.hover-highlight:hover {
    background-color: rgba(0,0,0,0.04);
    cursor: pointer;
}

/*notification*/

.notification-menu {
    max-height: 500px;
    overflow-y: auto;
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.notification-item:hover {
    background-color: rgba(0,0,0,0.04);
}

.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== FARM & BARN CARD ===== */

.farm-card,
.barn-card {
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(180deg, #F9FAFC 0%, #FFFFFF 100%);
}

    .farm-card:hover,
    .barn-card:hover {
        transform: translateY(-6px);
        background: linear-gradient(145deg, #E3F2FD 0%, #FFFFFF 100%);
        box-shadow: 0 8px 20px rgba(33, 150, 243, 0.25);
        border-color: rgba(33, 150, 243, 0.35);
    }

    .farm-card:active,
    .barn-card:active {
        transform: translateY(-2px) scale(0.98);
        box-shadow: 0 4px 12px rgba(33, 150, 243, 0.25);
    }

    .farm-card:hover .mud-typography-info,
    .barn-card:hover .mud-typography-info {
        color: #1565C0;
    }

    .farm-card:hover strong,
    .barn-card:hover strong {
        color: #1565C0;
    }

    .farm-card:hover::before,
    .barn-card:hover::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 12px;
        background: radial-gradient(circle at top left, rgba(33, 150, 243, 0.15), transparent 70%);
        pointer-events: none;
    }



/*sensor*/
.sensor-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    border-radius: 8px;
    padding: 8px;
    min-height: 115px;
    height: 100%;
}

.sensor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.1);
    background-color: rgba(0, 0, 0, 0.03);
}

.sensor-status {
    margin-right: 16px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

    .sensor-status.online {
        background-color: #00C853 !important;
    }

    .sensor-status.offline {
        background-color: #c4c4c4 !important;
    }
