/* =========================================
   ANYA RO - AAA PRODUCTION MASTER (FIXED DB)
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Rajdhani:wght@600;700;800&display=swap');

:root {
    --primary: #00a8ff;
    --primary-dark: #0097e6;
    --text-dark: #2c3e50;
    --text-muted: #57606f;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(0, 168, 255, 0.4);
}

body {
    background-color: #f0f2f5;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 168, 255, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(39, 60, 117, 0.03) 0%, transparent 20%);
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6, .navbar-brand, .btn {
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- NAVBAR --- */
.navbar { padding: 0.8rem 0; transition: all 0.3s ease; }
.nav-link {
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
    padding: 10px 15px !important;
    position: relative;
    transition: all 0.2s;
}
.nav-link:hover, .nav-link:focus { color: var(--primary) !important; }
.nav-link::after {
    content: ''; position: absolute; width: 0; height: 3px; bottom: 5px; left: 50%;
    background: var(--primary); transition: all 0.3s ease; transform: translateX(-50%); border-radius: 2px;
}
.nav-link:hover::after { width: 60%; box-shadow: var(--shadow-glow); }

/* --- DROPDOWNS --- */
.dropdown-menu {
    border: none; background: #ffffff; 
    border-top: 3px solid var(--primary);
    border-radius: 0 0 10px 10px; 
    box-shadow: var(--shadow-soft); 
    margin-top: 10px !important;
    padding: 10px;
    animation: slideUp 0.3s ease forwards;
}
.dropdown-item { padding: 10px 15px; font-weight: 500; font-size: 0.9rem; color: var(--text-muted); border-radius: 6px; transition: all 0.2s; }
.dropdown-item:hover { background: #f1f2f6; color: var(--primary); padding-left: 20px; }

/* --- HERO SECTION --- */
.hero-wrapper {
    background: linear-gradient(-45deg, #ffffff, #f0f2f5, #e6f7ff, #ffffff);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite; 
    border-bottom: 1px solid #e1e4e8;
    position: relative;
    z-index: 1;
}
.hero-title { animation: fadeInUp 0.8s ease-out; }

/* --- CONTENT CARD --- */
.main-card {
    border: none; border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft);
    animation: fadeInUp 1s ease-out;
    /* Allow tables to scroll if they are too wide */
    overflow-x: auto; 
}

/* --- TABLES (COMPACT FIXED) --- */
table, .horizontal-table, .vertical-table, .generic-form-table {
    width: 100% !important; 
    border-collapse: separate !important; 
    border-spacing: 0 6px !important; /* Reduced spacing */
    background: transparent !important; 
    border: none !important;
    margin-bottom: 0 !important;
}

th {
    font-family: 'Rajdhani', sans-serif; 
    font-weight: 700 !important; 
    font-size: 0.8rem !important;
    color: #a4b0be; 
    text-transform: uppercase; 
    padding: 10px 12px !important; /* Reduced Padding */
    border: none !important;
    white-space: nowrap; /* Keep headers on one line */
}

td {
    background: #fff; 
    padding: 10px 12px !important; /* FIX: Reduced from 18px to 10px */
    vertical-align: middle !important;
    border: 1px solid #f1f2f6; 
    border-width: 1px 0; 
    color: var(--text-dark); 
    font-weight: 500;
    font-size: 0.9rem; /* Readable font size */
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Rounded Row Corners */
tr td:first-child { border-left: 1px solid #f1f2f6; border-radius: 8px 0 0 8px; }
tr td:last-child { border-right: 1px solid #f1f2f6; border-radius: 0 8px 8px 0; }

/* Hover Effect */
tbody tr:hover td {
    transform: scale(1.005); 
    box-shadow: 0 4px 15px rgba(0, 168, 255, 0.08);
    border-color: transparent; 
    z-index: 10; 
    position: relative;
}

/* Fix Images in Item DB */
td img {
    vertical-align: middle;
}

/* --- INPUTS --- */
input[type=text], input[type=password], select {
    background: #f8f9fa; border: 2px solid #e1e4e8; border-radius: 10px; padding: 10px 15px; width: 100%; transition: 0.3s;
}
input:focus, select:focus { background: white; border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px rgba(0, 168, 255, 0.1); }

/* --- BUTTONS --- */
.btn-primary {
    background: linear-gradient(90deg, #00a8ff 0%, #0097e6 100%);
    border: none; border-radius: 50px; padding: 8px 30px; font-weight: 700;
    box-shadow: 0 5px 15px rgba(0, 168, 255, 0.3); transition: all 0.3s;
}
.btn-primary:hover {
    transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 168, 255, 0.5);
    background: linear-gradient(90deg, #0097e6 0%, #00a8ff 100%);
}

/* --- ANIMATIONS --- */
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gradientBG { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); } 70% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); } }

.pulse-dot {
    width: 8px; height: 8px; background-color: #2ecc71; border-radius: 50%;
    display: inline-block; margin-right: 6px; animation: pulse 2s infinite;
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    th { display: none !important; }
    tr { display: block; margin-bottom: 15px; border-radius: 12px; box-shadow: var(--shadow-soft); background: #fff; padding: 10px; }
    td { display: flex; justify-content: space-between; border: none !important; width: 100%; padding: 10px 5px !important; border-bottom: 1px dashed #eee !important; text-align: right; }
    td:last-child { border-bottom: none !important; }
    td::before { content: attr(title); font-weight: 700; color: #a4b0be; font-size: 0.8rem; text-transform: uppercase; }
}

/* =========================================
   MODERN UNITIP TOOLTIPS (Item Hover Fix)
   ========================================= */
#unitip {
    position: absolute;
    z-index: 9999;
    width: auto;
    max-width: 350px;
    pointer-events: none; /* Lets clicks pass through */
    display: none;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

/* The Body of the Tooltip */
#unitipmid {
    background: rgba(25, 27, 33, 0.95); /* Dark Glass */
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Hide the old ugly images */
#unitippoint, #unitipcap {
    display: none !important;
}

/* Style the Item Name inside Tooltip (usually <strong>) */
#unitipmid strong {
    color: #00a8ff; /* Primary Blue */
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
    margin-bottom: 5px;
}