﻿/* =========================================
   Base Styles
========================================= */
body {
    background: linear-gradient(to bottom right, #f9f9f9, #e9f3ff);
    color: #333;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   Navigation Bar
========================================= */
.menu-bar {
    background: linear-gradient(90deg, #007bff, #00aaff);
    padding: 8px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 0 0 12px 12px;
    flex-wrap: wrap;
    transition: background 0.3s ease;
}

    .menu-bar:hover {
        background: linear-gradient(90deg, #0056b3, #0090dd);
    }

.menu-logo {
    font-size: 1.6em;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.menu-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

    .menu-links a {
        color: #fff;
        text-decoration: none;
        padding: 8px 10px;
        border-radius: 30px;
        background: rgba(255,255,255,0.1);
        font-weight: 500;
        transition: all 0.3s ease;
    }

        .menu-links a:hover,
        .menu-links a:focus {
            background: #fff;
            color: #007bff;
            box-shadow: 0 4px 8px rgba(0,0,0,0.15);
            transform: translateY(-2px);
        }

/* =========================================
   User Controls
========================================= */
.user-controls {
    margin-left: auto;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.welcome-message {
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

    .welcome-message:hover,
    .welcome-message:focus {
        background: #fff;
        color: #007bff;
    }

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 45px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    overflow: hidden;
    min-width: 150px;
    z-index: 2000;
    flex-direction: column;
}

    .user-dropdown button {
        width: 100%;
        padding: 10px;
        border: none;
        background: none;
        text-align: left;
        cursor: pointer;
        font-weight: 500;
        transition: background 0.3s;
    }

        .user-dropdown button:hover {
            background: #007bff;
            color: #fff;
            transform: translateX(2px);
        }

.user-controls:hover .user-dropdown {
    display: flex;
}

.logout-button {
    background: #ff4d4d;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .logout-button:hover {
        background: #cc0000;
        transform: translateY(-2px);
        box-shadow: 0 3px 6px rgba(0,0,0,0.25);
    }

/* =========================================
   Mobile Navigation
========================================= */
.menu-icon {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: #fff;
}

.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .menu-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: linear-gradient(180deg, #007bff, #0056b3);
        border-radius: 0 0 15px 15px;
        margin-top: 10px;
    }


    .menu-toggle:checked ~ .menu-links {
        display: flex;
        animation: slideDown 0.4s ease;
    }

    .menu-links a {
        padding: 12px;
        border-top: 1px solid rgba(255,255,255,0.2);
        width: 100%;
        text-align: center;
    }

    .menu-icon {
        display: block;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Hero Section
========================================= */
.hero {
    text-align: center;
    color: #fff;
}

.hero-text h1 {
    font-size: 3em;
    margin: 0;
    text-shadow: 2px 2px 5px #000;
}

.hero-text p {
    font-size: 1.2em;
    text-shadow: 1px 1px 3px #000;
}

/* =========================================
   Layout & Containers
========================================= */
.container {
    width: 95%;
    margin: 20px auto;
    padding: 20px;
    background: #ffff;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

.two-columns {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

    .two-columns > div {
        flex: 1;
    }

.left h2 {
    color: #007bff;
}

.right img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* =========================================
   Cards & Services
========================================= */
.services {
    background-color: #eef2f7;
    padding: 35px 15px;
    text-align: center;
}

.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.card {
    background: #fff;
    padding: 15px;
    width: 100px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,255,0.1);
    transition: all 0.3s ease;
}

    .card:hover {
        transform: translateY(-9px);
        box-shadow: 0 10px 18px rgba(0,0,255,0.15);
    }

.icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* =========================================
   Buttons
========================================= */
.button, .btn-primary {
    background: #0056b3;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

    .button:hover, .btn-primary:hover,
    .button:focus, .btn-primary:focus {
        background: #00aaff;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }


.button, .btn-success {
    background: #007bff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

    .button:hover, .btn-success:hover,
    .button:focus, .btn-success:focus {
        background: #005f87;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

/* =========================================
   Tables
========================================= */
.custom-grid {
    border-collapse: collapse;
    width: 100%;
    font-family: Arial, sans-serif;
}

    .custom-grid th, .custom-grid td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }

    .custom-grid th {
        background-color: #f2f2f2;
        color: #333;
    }

.grid-wrapper {
    width: 100%;
    max-height: 500px;
    overflow: auto;
    margin: 20px auto;
    padding: 10px;
    white-space: nowrap;
}

/* =========================================
   Forms
========================================= */
.feedback-form input,
.feedback-form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1em;
}

/* =========================================
   Footer
========================================= */
footer {
    background-color: #006680;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
    width: 100%;
}

/* =========================================
   Tabs
========================================= */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-button {
    background: #f0f4ff;
    border: 1px solid #007bff;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #007bff;
    transition: all 0.3s ease;
}

    .tab-button:hover,
    .tab-button.active {
        background: #007bff;
        color: #fff;
        box-shadow: 0 3px 8px rgba(0, 123, 255, 0.3);
    }

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

    .tab-content.active {
        display: block;
        width: 100%;
        overflow-x: auto; /* prevents expansion*/
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Utilities
========================================= */
        .dot {
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

    .dot:hover,
    .dot.active {
        background-color: #717171;
    }

@media (max-width: 992px) {
    .two-columns {
        flex-direction: column;
    }
}

@media print {
    .no-print {
        display: none !important;
    }
}


/* =======================
   Layout Boxes
======================= */
.centered-div-login {
    margin: 20px auto;
    width: 400px;
    text-align: center;
    border: 1px solid #007bff;
    border-radius: 15px;
}


.centered-div {
    margin: 10px auto;
    width: 90%;
    text-align: left;
    border: 1px solid #007bff;
    border-radius: 15px;
    padding: 10px;
}

/* =======================
   Typography
======================= */
h2 {
    color: #0056b3;
    text-shadow: 1px 1px 2px #ccc;
    font-size: 2rem;
    margin-bottom: 10px;
}

h3 {
    color: #0056b3;
    font-style:italic;
}

.styled-list {
    list-style-type: none;
    padding: 0;
}

    .styled-list li {
        padding: 10px;
        margin-bottom: 8px;
        background: #e9f7fa;
        border-left: 5px solid #00aaff;
        border-radius: 4px;
    }


.gridview td input[type="text"] {
    width: 95%; /* keep edit textbox inside cell */
    box-sizing: border-box;
}

/* Buttons */
.btn {
    padding: 6px 14px;
    border: 1px solid #0d6efd;
    background: #0d6efd;
    color: white;
    cursor: pointer;
    border-radius: 4px;
}

    .btn:hover {
        background: #084298;
    }

.btn-small {
    padding: 4px 10px;
    font-size: 13px;
    background: #198754;
    color: white;
    border-radius: 3px;
}

/* Grid */
.grid {
    width: 95%;
    border-collapse: collapse;
}

    .grid th, .grid td {
        border: 1px solid #ccc;
        padding: 8px;
    }

    .grid th {
        background: #f0f0f0;
    }

/* Asset details */
.page-container {
    padding: 15px;
}

.section {
    margin-top: 15px;
}

.btn {
    padding: 6px 14px;
    background: #0d6efd;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

    .btn:hover {
        background: #084298;
    }

.btn-small {
    padding: 4px 8px;
    font-size: 13px;
    background: #198754;
    color: white;
    border-radius: 3px;
}

.info-text {
    color: #0d6efd;
}

/* Grid */
.grid {
    width: 95%;
    border-collapse: collapse;
}

    .grid th, .grid td {
        border: 1px solid #ccc;
        padding: 8px;
    }

    .grid th {
        position: sticky;
        top: 0;
        background: #f2f2f2;
        z-index: 5;
    }

/* Asset panel */
.asset-panel {
    border: 1px solid #ccc;
    margin-top: 15px;
}

.asset-header {
    background: #0d6efd;
    color: white;
    padding: 4px;
    font-weight: bold;
}

/* Details table */
.details-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* 🔥 THIS is the key */
}

.details-table th {
    width: 180px; /* fixed width for labels */
    text-align: left;
    padding: 8px 10px;
    background-color: #f0f0f0;
    font-weight: 600;
    vertical-align: top;
}

.details-table td {
    width: auto; /* take remaining space */
    padding: 8px 10px;
    word-break: break-word; /* wrap long text */
}

/* Description row */
.details-table tr:last-child td {
    min-height: 60px; /* give space for multi-line text */
    white-space: pre-wrap; /* wrap long description */
}

/* Status colors */
.status-using {
    background: #d1e7dd;
}

.status-usable {
    background: #cff4fc;
}

.status-damaged {
    background: #f8d7da;
}

.status-disposed {
    background: #e2e3e5;
}

.status-auctioned {
    background: #fff3cd;
}

.status-repair {
    background: #ffe5b4;
}

.status-transfer {
    background: #cfe2ff;
}

/*GridView Stock*/
.grid-scroll {
    max-height: 500px; /* adjust height */
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #ddd;
    margin-right:10%;
}

    .grid-scroll thead th {
        position: sticky;
        top: 0;
        background: #f8f9fa;
        z-index: 2;
        text-align: center;
    }

    .grid-scroll table {
        border-collapse: collapse;
        width: 100%;
    }

