/* ====================================================
   PAGRINDINIS DARBO STALO STILIUS (DASHBOARD + LOGIN)
   ==================================================== */

/* --- GLOBALŪS KINTAMIEJI (Statika) --- */
:root {
    --tf-text-heading: #0f172a;
    --tf-text-main: #334155;
    --tf-text-muted: #64748b;
    --tf-border: #e2e8f0;
    --tf-border-light: #f1f5f9;
    --tf-menu-hover: #f8fafc;
    --tf-menu-active: #eff6ff;
    --tf-shadow: rgba(0, 0, 0, 0.03);
    --tf-shadow-hover: rgba(0, 0, 0, 0.08);
    --tf-input-bg: #ffffff;
}

body.tf-dark-mode {
    --tf-text-heading: #f8fafc;
    --tf-text-main: #cbd5e1;
    --tf-text-muted: #94a3b8;
    --tf-border: #334155;
    --tf-border-light: #1e293b;
    --tf-menu-hover: #334155;
    --tf-menu-active: rgba(0, 0, 0, 0.2);
    --tf-shadow: rgba(0, 0, 0, 0.3);
    --tf-shadow-hover: rgba(0, 0, 0, 0.5);
    --tf-input-bg: #0f172a;
}

/* ====================================================
   1. MODERNUS PRISIJUNGIMO LANGAS (NEPRISIJUNGUS)
   ==================================================== */
body:not(.logged-in), body:not(.logged-in) .site, body:not(.logged-in) .site-content, body:not(.logged-in) #page, body:not(.logged-in) #content, body:not(.logged-in) #main { 
    background-color: #0f172a !important; 
    background-image: radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.08), transparent 25%), radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.05), transparent 25%) !important;
    perspective: 1500px;
}

body:not(.logged-in) h1, body:not(.logged-in) h2.page-title, body:not(.logged-in) .entry-title, body:not(.logged-in) .post-title, body:not(.logged-in) .elementor-page-title { display: none !important; }

.tf-login-showcase {
    max-width: 900px; margin: 160px auto 120px auto; background: #ffffff; border-radius: 28px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    display: flex; overflow: hidden; font-family: 'Inter', sans-serif; position: relative; z-index: 10;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.2s ease; transform-style: preserve-3d; will-change: transform;
}
@media (min-width: 901px) { .tf-login-showcase:hover { box-shadow: 0 35px 70px -10px rgba(0,0,0,0.6); } }

.tf-login-brand {
    flex: 1; background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); padding: 80px 50px; color: white; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid rgba(255,255,255,0.06); position: relative; overflow: hidden;
    animation: tfBrandingSlideIn 1.2s cubic-bezier(0.2, 1, 0.2, 1) forwards; opacity: 0;
}
.tf-login-brand::after { content: ''; position: absolute; top: -50%; left: -50%; width: 100%; height: 100%; background: radial-gradient(circle, rgba(37,99,235,0.1) 0%, transparent 70%); pointer-events: none; }
.tf-login-brand img { max-width: 150px; margin-bottom: 35px; filter: brightness(0) invert(1); transform: translateZ(20px); }
.tf-brand-title { color: white !important; font-size: 32px !important; font-weight: 800 !important; margin: 0 0 18px 0 !important; line-height: 1.15 !important; display: block !important; letter-spacing: -1px !important; transform: translateZ(15px); }
.tf-login-brand p { color: #94a3b8; font-size: 15px; line-height: 1.7; margin: 0; max-width: 340px; transform: translateZ(10px); }

.tf-login-form-area { flex: 1; padding: 80px 60px; background: #ffffff; display: flex; flex-direction: column; justify-content: center; animation: tfFormSlideIn 1s cubic-bezier(0.2, 1, 0.2, 1) forwards 0.3s; opacity: 0; }
.tf-login-form-area h3 { margin: 0 0 35px 0; color: #0f172a; font-size: 24px; font-weight: 800; letter-spacing: -0.8px; }
.tf-login-form-area .login-username, .tf-login-form-area .login-password { margin-bottom: 22px; }
.tf-login-form-area label { display: block; font-size: 11px; font-weight: 800; color: #64748b; text-transform: uppercase; margin-bottom: 9px; letter-spacing: 0.6px; }
.tf-login-form-area input[type="text"], .tf-login-form-area input[type="password"] { width: 100%; padding: 16px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; font-size: 15px; color: #0f172a; transition: all 0.25s ease; box-sizing: border-box; outline: none; font-family: inherit; }
.tf-login-form-area input[type="text"]:hover, .tf-login-form-area input[type="password"]:hover { border-color: #cbd5e1; }
.tf-login-form-area input[type="text"]:focus, .tf-login-form-area input[type="password"]:focus { border-color: var(--tf-primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); background: #ffffff; }
.tf-login-form-area .login-remember { margin-bottom: 30px; font-size: 14px; color: #475569; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.tf-login-form-area .login-remember input { width: auto !important; margin: 0; cursor: pointer; }
.tf-login-form-area .login-submit { margin: 0; }
.tf-login-form-area .login-submit input[type="submit"] { width: 100%; background: var(--tf-primary); color: #fff; border: none; padding: 16px; border-radius: 12px; font-size: 16px; font-weight: 800; cursor: pointer; transition: all 0.2s ease; font-family: inherit; box-shadow: 0 4px 6px rgba(37, 99, 235, 0.15); }
.tf-login-form-area .login-submit input[type="submit"]:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 7px 14px rgba(37, 99, 235, 0.25); }
.tf-login-form-area .login-submit input[type="submit"]:active { transform: translateY(0px); box-shadow: 0 3px 6px rgba(37, 99, 235, 0.15); }

@keyframes tfBrandingSlideIn { 0% { opacity: 0; transform: translateX(-30px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes tfFormSlideIn { 0% { opacity: 0; transform: translateX(30px); } 100% { opacity: 1; transform: translateX(0); } }

/* ====================================================
   2. PORTALO IŠDĖSTYMAS (PRISIJUNGUS)
   ==================================================== */
.tf-dashboard { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    color: var(--tf-text-main); 
    min-height: 100vh; 
    display: flex; 
    transition: color 0.3s ease; 
}

/* ŠONINĖ JUOSTA (SIDEBAR) */
.tf-main-sidebar { position: fixed; top: 0; left: 0; height: 100vh; width: 65px; background: var(--tf-bg-sidebar); border-right: 1px solid var(--tf-border); transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease; z-index: 9999; overflow-x: hidden; display: flex; flex-direction: column; }
@media (min-width: 901px) { body.admin-bar .tf-main-sidebar { top: 32px; height: calc(100vh - 32px); } }
.tf-main-sidebar:hover { width: 260px; box-shadow: 15px 0 30px var(--tf-shadow-hover); }

.tf-sidebar-logo { display: flex; align-items: center; height: 70px; border-bottom: 1px solid var(--tf-border-light); white-space: nowrap; color: var(--tf-primary); text-decoration: none !important; }
.tf-logo-icon { width: 65px; flex-shrink: 0; display: flex; justify-content: center; align-items: center; }
.tf-logo-icon img { width: 35px; height: 35px; object-fit: contain; transition: transform 0.2s ease; }
body.tf-dark-mode .tf-logo-icon img { filter: brightness(0) invert(1); }
.tf-main-sidebar:hover .tf-logo-icon img { transform: scale(1.05); }
.tf-logo-text { font-size: 18px; font-weight: 800; opacity: 0; transition: opacity 0.2s, color 0.3s; color: var(--tf-text-heading); }
.tf-main-sidebar:hover .tf-logo-text { opacity: 1; }

.tf-menu-wrapper { flex-grow: 1; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
.tf-menu-group { font-size: 10px; font-weight: 800; color: var(--tf-text-muted); text-transform: uppercase; letter-spacing: 1px; padding: 20px 0 8px 20px; opacity: 0; white-space: nowrap; transition: opacity 0.2s, color 0.3s; margin: 0; }
.tf-main-sidebar:hover .tf-menu-group { opacity: 1; }

.tf-menu-link { display: flex; align-items: center; color: var(--tf-text-muted); text-decoration: none !important; height: 48px; transition: all 0.2s; white-space: nowrap; position: relative; border: none; outline: none; }
.tf-menu-link:hover, .tf-menu-link:focus, .tf-menu-link:active { background: var(--tf-menu-hover); color: var(--tf-primary); text-decoration: none !important; }
.tf-menu-link.active { background: var(--tf-menu-active); color: var(--tf-primary); font-weight: 700; text-decoration: none !important; }
.tf-menu-link.active::before { content: ''; position: absolute; left: 0; top: 10%; height: 80%; width: 4px; background: var(--tf-primary); border-radius: 0 4px 4px 0; }

.tf-menu-icon { width: 65px; flex-shrink: 0; display: flex; justify-content: center; font-size: 18px; text-decoration: none !important; }
.tf-menu-text { font-size: 14px; opacity: 0; transition: opacity 0.2s; text-decoration: none !important; }
.tf-main-sidebar:hover .tf-menu-text { opacity: 1; }
.tf-theme-toggle-btn { border-top: 1px solid var(--tf-border); margin-top: auto; }

/* PAGRINDINIS TURINYS */
.tf-app-main { margin-left: 65px; padding: 30px 40px; width: calc(100% - 65px); box-sizing: border-box; min-height: 100vh; }
.tf-main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 1px solid var(--tf-border); padding-bottom: 15px; transition: border-color 0.3s ease; }
.tf-main-header h2 { margin: 0; font-size: 22px; color: var(--tf-text-heading); font-weight: 800; letter-spacing: -0.5px; transition: color 0.3s ease; }

.tf-user-info { display: flex; align-items: center; gap: 15px; font-size: 14px; color: var(--tf-text-muted); }
.tf-btn-back-web { background: transparent; color: var(--tf-primary); padding: 6px 12px; border-radius: 6px; text-decoration: none !important; font-weight: 600; transition: 0.2s; border: 1px solid var(--tf-primary); }
.tf-btn-back-web:hover { background: var(--tf-primary); color: white; }
.tf-btn-logout { background: var(--tf-bg-sidebar); color: var(--tf-text-muted); padding: 6px 12px; border-radius: 6px; text-decoration: none !important; font-weight: 600; transition: 0.2s; border: 1px solid var(--tf-border); }
.tf-btn-logout:hover, .tf-btn-logout:focus { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; text-decoration: none !important; }

.tf-card { background: var(--tf-bg-card); padding: 35px; border-radius: 16px; box-shadow: 0 4px 20px var(--tf-shadow); border: 1px solid var(--tf-border); overflow-x: auto; transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.tf-badge { display: inline-flex !important; align-items: center !important; justify-content: center !important; padding: 6px 12px !important; min-height: 28px !important; line-height: normal !important; box-sizing: border-box !important; }

/* =========================================
   3. TELEFONO VERSIJA (MEDIA QUERIES)
   ========================================= */
@media (max-width: 900px) {
    /* Login */
    .tf-login-showcase { flex-direction: column; margin: 140px 20px 60px 20px; border-radius: 20px; perspective: none; }
    .tf-login-showcase:hover { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }
    .tf-login-brand { padding: 50px 30px; text-align: center; align-items: center; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); animation: tfBrandingSlideInMobile 1s ease forwards; }
    .tf-login-brand img { max-width: 120px; margin-bottom: 25px; transform: none; }
    .tf-brand-title { font-size: 26px !important; margin-bottom: 12px !important; transform: none; }
    .tf-login-brand p { font-size: 14px; transform: none; }
    .tf-login-form-area { padding: 50px 30px; animation: tfFormSlideInMobile 1s ease forwards 0.2s; }
    .tf-login-form-area h3 { font-size: 20px; margin-bottom: 25px; }

    /* Dashboard Sidebar */
    .tf-main-sidebar { width: 100% !important; height: 70px !important; top: auto !important; bottom: 0 !important; flex-direction: row !important; justify-content: flex-start !important; align-items: center !important; border-top: 1px solid var(--tf-border); border-right: none; overflow-x: auto !important; overflow-y: hidden !important; box-shadow: 0 -4px 15px var(--tf-shadow) !important; z-index: 99999; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .tf-main-sidebar::-webkit-scrollbar { display: none; }
    .tf-main-sidebar:hover { width: 100% !important; box-shadow: 0 -4px 15px var(--tf-shadow) !important; }
    .tf-sidebar-logo, .tf-menu-group { display: none !important; }
    .tf-menu-wrapper { flex-direction: row !important; flex-shrink: 0 !important; margin: 0 !important; padding: 0 !important; }
    .tf-app-main { margin-left: 0; padding: 15px; padding-bottom: 90px; width: 100%; }
    
    .tf-menu-link { height: 70px !important; padding: 0 5px !important; flex-direction: column !important; justify-content: center !important; flex: 0 0 85px !important; min-width: 85px !important; }
    .tf-menu-icon { width: auto !important; font-size: 20px !important; margin-bottom: 4px; }
    .tf-menu-text { display: block !important; opacity: 1 !important; font-size: 9px !important; text-transform: uppercase; font-weight: 700; letter-spacing: 0; }
    .tf-menu-link.active::before { top: 0; left: 15%; width: 70%; height: 3px; border-radius: 0 0 4px 4px; }
    .tf-theme-toggle-btn { flex: 0 0 85px !important; min-width: 85px !important; flex-shrink: 0 !important; border-top: none !important; margin-top: 0 !important; border-left: 1px solid var(--tf-border) !important; }

    .tf-card { padding: 15px; }
    .tf-main-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .tf-user-info { flex-wrap: wrap; }
}

@keyframes tfBrandingSlideInMobile { 0% { opacity: 0; transform: translateY(-20px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes tfFormSlideInMobile { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }