﻿/* =============================================
   TrackTag — Site Stylesheet
   Fyp_Project | ASP.NET Web Forms
   ============================================= */

/* ---------- Reset ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    color: #1a1a1a;
    background: #f4f5f7;
    min-height: 100vh;
}

a {
    color: #185FA5;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* ---------- Nav ---------- */
.tt-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: #ffffff;
    border-bottom: 1px solid #e4e4e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tt-nav-logo {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.tt-logo-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #185FA5;
    display: inline-block;
    flex-shrink: 0;
}

.tt-nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
}

    .tt-nav-links a {
        padding: 6px 15px;
        border-radius: 8px;
        border: 1px solid transparent;
        font-size: 13px;
        color: #555;
        text-decoration: none;
        transition: background 0.15s, color 0.15s;
    }

        .tt-nav-links a:hover {
            background: #f0f1f3;
            color: #1a1a1a;
            text-decoration: none;
        }

        .tt-nav-links a.active {
            background: #f0f1f3;
            color: #1a1a1a;
            font-weight: 500;
        }

/* ---------- Nav user ---------- */
.tt-nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #1a1a1a;
    font-weight: 600;
}

.tt-nav-user-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8f0fe;
    color: #185FA5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* ---------- Page wrapper ---------- */
.tt-page {
    max-width: 580px;
    margin: 0 auto;
    padding: 44px 24px 60px;
}

.tt-page-wide {
    max-width: 960px;
    margin: 0 auto;
    padding: 36px 24px 60px;
}

/* ---------- Page headings ---------- */
.tt-page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.tt-page-sub {
    font-size: 14px;
    color: #6b6b6b;
    margin-bottom: 32px;
    line-height: 1.55;
}

/* ============================================================
   BUTTONS — complete rewrite
   ============================================================ */

/* Base shared styles */
.tt-btn-primary,
.tt-btn-secondary,
.tt-btn-filter-active,
input[type="submit"] {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    padding: 9px 22px;
    line-height: 1;
    vertical-align: middle;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

/* Primary — solid blue always */
.tt-btn-primary {
    background: #185FA5;
    color: #ffffff !important;
    border: 2px solid #185FA5;
}

    .tt-btn-primary:hover {
        background: #134d87;
        border-color: #134d87;
        color: #ffffff !important;
        text-decoration: none;
    }

/* Secondary — transparent, turns blue on hover */
.tt-btn-secondary {
    background: transparent;
    color: #1a1a1a !important;
    border: 2px solid #c8c8c4;
}

    .tt-btn-secondary:hover {
        background: #185FA5;
        border-color: #185FA5;
        color: #ffffff !important;
        text-decoration: none;
    }

/* Active filter — solid blue */
.tt-btn-filter-active {
    background: #185FA5;
    color: #ffffff !important;
    border: 2px solid #185FA5;
}

    .tt-btn-filter-active:hover {
        background: #134d87;
        border-color: #134d87;
        color: #ffffff !important;
        text-decoration: none;
    }

/* Full width modifier */
.tt-btn-full {
    width: 100%;
    display: block;
    text-align: center;
}

/* ---------- Forms ---------- */
.tt-form-group {
    margin-bottom: 20px;
}

    .tt-form-group label,
    .tt-form-group .tt-label {
        display: block;
        font-size: 13px;
        font-weight: 500;
        margin-bottom: 6px;
        color: #1a1a1a;
    }

    .tt-form-group input[type="text"],
    .tt-form-group input[type="email"],
    .tt-form-group select,
    .tt-input {
        width: 100%;
        padding: 9px 13px;
        border: 1px solid #c8c8c4;
        border-radius: 8px;
        background: #ffffff;
        color: #1a1a1a;
        font-size: 14px;
        transition: border-color 0.15s;
        font-family: inherit;
    }

        .tt-form-group input:focus,
        .tt-form-group select:focus,
        .tt-input:focus {
            outline: none;
            border-color: #185FA5;
            box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
        }

/* ---------- Alerts / banners ---------- */
.tt-alert {
    padding: 11px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
    display: none;
}

    .tt-alert.visible {
        display: block;
    }

.tt-alert-success {
    background: #EAF3DE;
    border: 1px solid #C0DD97;
    color: #27500A;
}

.tt-alert-warning {
    background: #FAEEDA;
    border: 1px solid #FAC775;
    color: #633806;
}

.tt-alert-danger {
    background: #FCEBEB;
    border: 1px solid #F7C1C1;
    color: #791F1F;
}

/* ---------- QR preview box ---------- */
.tt-qr-preview {
    background: #f4f5f7;
    border: 1px solid #e4e4e0;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    margin-top: 24px;
}

.tt-qr-image {
    display: block;
    margin: 0 auto 14px;
    border-radius: 6px;
    border: 1px solid #e4e4e0;
}

.tt-qr-caption {
    font-size: 13px;
    color: #6b6b6b;
    word-break: break-all;
}

.tt-qr-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* ---------- Found / scan result ---------- */
.tt-found-card {
    background: #ffffff;
    border: 1px solid #e4e4e0;
    border-radius: 12px;
    padding: 40px 28px;
    text-align: center;
    max-width: 440px;
    margin: 48px auto;
}

.tt-found-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 28px;
}

.tt-found-icon-success {
    background: #EAF3DE;
}

.tt-found-icon-warning {
    background: #FAEEDA;
}

.tt-found-icon-danger {
    background: #FCEBEB;
}

.tt-found-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tt-found-item {
    font-size: 15px;
    color: #555;
    margin-bottom: 20px;
}

.tt-status-pill {
    display: inline-block;
    padding: 5px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 18px;
}

.tt-pill-found {
    background: #EAF3DE;
    color: #27500A;
}

.tt-pill-already {
    background: #FAEEDA;
    color: #633806;
}

.tt-pill-invalid {
    background: #FCEBEB;
    color: #791F1F;
}

.tt-found-msg {
    font-size: 13px;
    color: #6b6b6b;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ---------- Stats grid ---------- */
.tt-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.tt-stat-card {
    background: #ffffff;
    border: 1px solid #e4e4e0;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
}

.tt-stat-num {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 4px;
}

.tt-stat-lbl {
    font-size: 12px;
    color: #6b6b6b;
}

.tt-stat-blue {
    color: #185FA5;
}

.tt-stat-green {
    color: #3B6D11;
}

.tt-stat-amber {
    color: #854F0B;
}

/* ---------- Dashboard table ---------- */
.tt-table-wrap {
    background: #ffffff;
    border: 1px solid #e4e4e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.tt-table-head {
    display: grid;
    grid-template-columns: 96px 1.5fr 1fr 110px 200px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #6b6b6b;
    background: #f8f8f6;
    border-bottom: 1px solid #e4e4e0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    align-items: center;
}

.tt-table-row {
    display: grid;
    grid-template-columns: 96px 1.5fr 1fr 110px 200px;
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid #f0f0ec;
    align-items: center;
    gap: 8px;
    transition: background 0.1s;
}

    .tt-table-row:last-child {
        border-bottom: none;
    }

    .tt-table-row:hover {
        background: #fafaf8;
    }

/* ---------- Photo thumbnail ---------- */
.tt-thumb-wrap {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e4e4e0;
    flex-shrink: 0;
}

    .tt-thumb-wrap img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        display: block;
    }

.tt-no-photo {
    width: 80px;
    height: 80px;
    background: #f4f5f7;
    border-radius: 8px;
    border: 1px solid #e4e4e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #bbb;
    text-align: center;
}

/* ---------- Badges ---------- */
.tt-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.tt-badge-lost {
    background: #FCEBEB;
    color: #791F1F;
}

.tt-badge-found {
    background: #EAF3DE;
    color: #27500A;
}

/* ---------- Contact Owner button ---------- */
.tt-contact-btn {
    display: inline-block;
    padding: 6px 12px;
    background: #e8f0fe;
    color: #185FA5;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #c5d8fb;
    transition: background 0.15s;
    white-space: nowrap;
}

    .tt-contact-btn:hover {
        background: #185FA5;
        color: #ffffff;
        text-decoration: none;
    }

/* ---------- Table row action ---------- */
.tt-row-action {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 7px;
    border: 1px solid #c8c8c4;
    background: transparent;
    cursor: pointer;
    color: #555;
    font-family: inherit;
    transition: background 0.1s;
}

    .tt-row-action:hover {
        background: #f0f1f3;
    }

/* ---------- Dash header row ---------- */
.tt-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

    .tt-dash-header h2 {
        font-size: 20px;
        font-weight: 600;
    }

/* ---------- Hero (home page) ---------- */
.tt-hero {
    padding: 72px 24px 56px;
    text-align: center;
    background: #ffffff;
    border-bottom: 1px solid #e4e4e0;
}

.tt-hero-badge {
    display: inline-block;
    font-size: 12px;
    background: #E6F1FB;
    color: #0C447C;
    padding: 4px 14px;
    border-radius: 8px;
    margin-bottom: 22px;
    font-weight: 500;
}

.tt-hero h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.22;
    margin-bottom: 16px;
    color: #1a1a1a;
}

    .tt-hero h1 span {
        color: #185FA5;
    }

.tt-hero p {
    font-size: 15px;
    color: #6b6b6b;
    max-width: 460px;
    margin: 0 auto 36px;
    line-height: 1.65;
}

.tt-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- How it works ---------- */
.tt-how {
    padding: 52px 32px;
    background: #f4f5f7;
    border-bottom: 1px solid #e4e4e0;
}

.tt-section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 28px;
    text-align: center;
    color: #1a1a1a;
}

.tt-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.tt-step-card {
    background: #ffffff;
    border: 1px solid #e4e4e0;
    border-radius: 12px;
    padding: 22px 18px;
}

.tt-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #E6F1FB;
    color: #0C447C;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.tt-step-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 7px;
    color: #1a1a1a;
}

.tt-step-card p {
    font-size: 13px;
    color: #6b6b6b;
    line-height: 1.55;
}

/* ---------- Home stats ---------- */
.tt-home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: #ffffff;
    border-bottom: 1px solid #e4e4e0;
}

.tt-home-stat {
    padding: 28px 20px;
    text-align: center;
    border-right: 1px solid #e4e4e0;
}

    .tt-home-stat:last-child {
        border-right: none;
    }

    .tt-home-stat .num {
        font-size: 30px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .tt-home-stat .lbl {
        font-size: 13px;
        color: #6b6b6b;
    }

/* ---------- Print QR ---------- */
@media print {
    .tt-nav,
    .tt-btn-primary,
    .tt-btn-secondary,
    .tt-nav-links {
        display: none !important;
    }

    .tt-qr-preview {
        border: none;
        padding: 0;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .tt-nav {
        padding: 12px 16px;
    }

    .tt-nav-links a {
        padding: 5px 10px;
        font-size: 12px;
    }

    .tt-hero h1 {
        font-size: 26px;
    }

    .tt-stats,
    .tt-home-stats {
        grid-template-columns: 1fr;
    }

    .tt-home-stat {
        border-right: none;
        border-bottom: 1px solid #e4e4e0;
    }

    .tt-table-head,
    .tt-table-row {
        grid-template-columns: 64px 1fr 80px;
    }

        .tt-table-head span:nth-child(3),
        .tt-table-head span:nth-child(5),
        .tt-table-row span:nth-child(3),
        .tt-table-row span:nth-child(5) {
            display: none;
        }

    .tt-page,
    .tt-page-wide {
        padding: 28px 14px 48px;
    }
}

/* ============================================================
   AUTH PAGES — Login, Register
   ============================================================ */

.tt-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: #f7f8fa;
}

.tt-auth-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
}

.tt-auth-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    margin-bottom: 28px;
    justify-content: center;
}

.tt-auth-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    text-align: center;
}

.tt-auth-sub {
    font-size: 13px;
    color: #6b6b6b;
    text-align: center;
    margin-bottom: 28px;
}

.tt-auth-divider {
    text-align: center;
    font-size: 13px;
    color: #6b6b6b;
    margin-top: 20px;
}

    .tt-auth-divider a {
        color: #185FA5;
        text-decoration: none;
        font-weight: 600;
    }

        .tt-auth-divider a:hover {
            text-decoration: underline;
        }

/* ============================================================
   PROFILE PAGE
   ============================================================ */

.tt-profile-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 32px;
    max-width: 520px;
    margin: 40px auto;
}

.tt-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #e8f0fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #185FA5;
    margin: 0 auto 20px;
}

.tt-profile-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 4px;
}

.tt-profile-email {
    font-size: 13px;
    color: #6b6b6b;
    text-align: center;
    margin-bottom: 28px;
}

.tt-profile-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
    margin-top: 20px;
}

.tt-profile-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b6b6b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.tt-profile-stat-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.tt-profile-stat {
    flex: 1;
    background: #f7f8fa;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

    .tt-profile-stat .num {
        font-size: 24px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .tt-profile-stat .lbl {
        font-size: 12px;
        color: #6b6b6b;
    }

.tt-logout-btn {
    display: block;
    width: 100%;
    padding: 11px;
    border-radius: 8px;
    border: 1px solid #f7c1c1;
    background: #fcebeb;
    color: #791f1f;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    margin-top: 20px;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
    font-family: 'Segoe UI', Arial, sans-serif;
}

    .tt-logout-btn:hover {
        background: #f7c1c1;
        text-decoration: none;
    }

/* ============================================================
   HERO + CAROUSEL
   ============================================================ */

.tt-hero {
    background: #ffffff;
    border-bottom: 1px solid #e4e4e0;
    padding: 72px 32px;
    overflow: hidden;
}

.tt-hero-inner {
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 56px;
}

/* ---------- Hero text ---------- */
.tt-hero-details {
    flex: 1;
    min-width: 0;
}

.tt-hero-badge {
    display: inline-block;
    font-size: 12px;
    background: #E6F1FB;
    color: #0C447C;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.tt-hero-details h1 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.18;
    margin-bottom: 18px;
    color: #1a1a1a;
}

    .tt-hero-details h1 span {
        color: #185FA5;
    }

.tt-hero-details p {
    font-size: 15px;
    color: #6b6b6b;
    margin-bottom: 36px;
    line-height: 1.7;
    max-width: 420px;
}

.tt-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Carousel wrapper ---------- */
.tt-carousel-wrap {
    width: 320px;
    min-width: 320px;
    height: 500px;
    display: flex;
    gap: 14px;
    overflow: hidden;
    border-radius: 16px;
    flex-shrink: 0;
}

/* ---------- Carousel columns ---------- */
.tt-carousel-col {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
}

    /* 
   Fix for smooth infinite scroll:
   Each group has 4 cards × (150px height + 14px gap) = 656px
   We scroll exactly one group height so it loops seamlessly
*/
    .tt-carousel-col.left .tt-carousel-group {
        display: flex;
        flex-direction: column;
        gap: 14px;
        animation: ttScrollDown 20s infinite linear;
        will-change: transform;
    }

    .tt-carousel-col.right .tt-carousel-group {
        display: flex;
        flex-direction: column;
        gap: 14px;
        animation: ttScrollUp 20s infinite linear;
        will-change: transform;
    }

    .tt-carousel-col:hover .tt-carousel-group {
        animation-play-state: paused;
    }

/* ---------- Carousel cards ---------- */
.tt-carousel-card {
    width: 100%;
    height: 150px;
    min-height: 150px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    background: #f0f0f0;
}

    .tt-carousel-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/*
   Each group = 4 cards × 150px + 3 gaps × 14px + bottom gap 14px = 656px
   translateY(-656px) moves exactly one full group so next group is in same position
   This creates a seamless loop with no jump
*/
@keyframes ttScrollDown {
    0% {
        transform: translateY(0px);
    }

    100% {
        transform: translateY(-656px);
    }
}

@keyframes ttScrollUp {
    0% {
        transform: translateY(-656px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .tt-hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .tt-hero-details p {
        max-width: 100%;
    }

    .tt-hero-actions {
        justify-content: center;
    }

    .tt-carousel-wrap {
        width: 100%;
        min-width: unset;
        height: 300px;
    }

    .tt-carousel-card {
        height: 120px;
        min-height: 120px;
    }
}

@media (max-width: 600px) {
    .tt-hero {
        padding: 48px 20px;
    }

    .tt-hero-details h1 {
        font-size: 28px;
    }

    .tt-carousel-wrap {
        height: 240px;
    }

    .tt-carousel-card {
        height: 100px;
        min-height: 100px;
    }
}