@font-face {
    font-family: 'UKIJ Ekran';
    src: url('../font/UKIJEkran.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
body { background-color: #f8f9fa; font-family: "UKIJ Ekran", "Scheherazade New", "Noto Sans Arabic", "Microsoft Uighur", "Microsoft YaHei", "Segoe UI", sans-serif; }
.card { border-radius: .75rem; }
.navbar-brand { font-weight: 700; }
.plot-card .card-header { border-radius: .75rem .75rem 0 0; }
.table thead th { white-space: nowrap; }
.table td { direction: rtl; }
.timer-display { font-size: 1.5rem; font-weight: bold; font-family: 'Courier New', monospace; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.clock-display { font-size: 1.1rem; color: #666; }
.clock-display .live-clock { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.last-watered-badge { direction: ltr; unicode-bidi: isolate; }
.ltr-text { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.datetime-cell { direction: ltr; unicode-bidi: isolate; text-align: right; }

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255,255,255,0.97);
    border-top: 0.5px solid rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-evenly;
    align-items: flex-start;
    padding: 6px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 9999;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}
.bottom-nav::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 134px;
    height: 5px;
    background: #000;
    border-radius: 100px;
    opacity: 0.18;
}
.bottom-nav a {
    flex: 1;
    max-width: 120px;
    text-align: center;
    color: #b0b0b0;
    text-decoration: none;
    font-size: 0.7rem;
    padding: 2px 0 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.25s ease;
    position: relative;
}
.bottom-nav a.active {
    color: #198754;
}
.bottom-nav .nav-icon {
    display: block;
    width: 26px;
    height: 26px;
    margin-bottom: 2px;
    line-height: 1;
}
.bottom-nav a.active .nav-icon {
    transform: scale(1.05);
}
body.with-bottom-nav {
    padding-bottom: 75px;
}
.btn-group-mobile {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

@media (max-width: 768px) {
    .container, .container-fluid { padding-left: 10px; padding-right: 10px; }
    .card-body { padding: .75rem; }
    .table { font-size: .85rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }
    .btn-sm { padding: .25rem .5rem; font-size: .8rem; }
    .navbar-brand { font-size: 1rem; }
    .timer-display { font-size: 1.2rem; }
    .bottom-nav a { font-size: 0.7rem; }
}

@media (max-width: 576px) {
    .container, .container-fluid { padding-left: 8px; padding-right: 8px; }
    .card-body { padding: .625rem; }
    .table { font-size: .8rem; }
    .table-responsive { border: 0; }
    .stats-card h3 { font-size: 1.1rem; }
    .stats-card h6 { font-size: .75rem; }
    .plot-tab { font-size: .8rem; padding: .4rem .75rem; }
    body.with-bottom-nav { padding-bottom: 70px; }
    .bottom-nav { padding: 5px 0 calc(7px + env(safe-area-inset-bottom)); }
    .bottom-nav a { font-size: 0.68rem; }
    .bottom-nav .nav-icon { width: 24px; height: 24px; }
    .table td .btn-sm { padding: .2rem .35rem; font-size: .7rem; margin: 0 .1rem .2rem 0; }
    .btn-group-mobile { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-start; }
}

/* Swipe list styles for transfer modal */
.swipe-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 5px;
}
.swipe-section {
    margin-bottom: 12px;
}
.swipe-label {
    font-weight: 600;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
}
.swipe-item {
    padding: 10px 14px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}
.swipe-item:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateX(-2px);
}
.swipe-item:active {
    background-color: #d1e7dd;
    border-color: #198754;
}
.swipe-current {
    background: linear-gradient(135deg, #d1e7dd, #e6f7ee);
    border-color: #198754;
    border-width: 2px;
    font-weight: 700;
    text-align: center;
    justify-content: center;
    padding: 12px;
    margin: 12px 0;
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.15);
}
.swipe-name {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
}
.swipe-phone {
    font-size: 0.85rem;
    color: #6c757d;
    direction: ltr;
}

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: #2c3e50; color: #fff; position: fixed; top: 0; right: 0; bottom: 0; overflow-y: auto; z-index: 100; transition: transform 0.3s; }
.sidebar-brand { padding: 20px; font-size: 1.1rem; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.1); text-align: center; }
.sidebar-nav { padding: 12px 0; }
.sidebar-nav a { display: block; padding: 12px 20px; color: rgba(255,255,255,0.75); text-decoration: none; transition: all 0.2s; font-size: 0.95rem; border-right: 3px solid transparent; }
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,0.12); color: #fff; border-right-color: #3498db; }
.sidebar-user { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; }
.sidebar-user a { color: rgba(255,255,255,0.6); text-decoration: none; display: block; padding: 4px 0; }
.sidebar-user a:hover { color: #fff; }
.main-content { flex: 1; margin-right: 240px; }
.topbar { background: #34495e; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; }
.topbar-title { color: #fff; font-size: 1.1rem; font-weight: 500; margin: 0; }
.sidebar-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
@media (max-width: 768px) {
    .sidebar { transform: translateX(100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-right: 0; }
    .sidebar-toggle { display: block; }
}
