
/* ============================================================
   JMED WEBSITE & ADMINISTRATION
   Main Stylesheet

   File: public_html/assets/style.css

   Brand:
   - Primary background: #080B0D
   - Secondary background: #111619
   - Cards and panels: #171C20
   - Brand blue: #1AAED2
   - Primary text: #F5F7F8

   Sections:
   01. Design Tokens
   02. Global Reset
   03. Typography & Links
   04. Announcement Bar
   05. Navigation
   06. Hero
   07. Layout & Sections
   08. Categories
   09. Product Grid
   10. Product Details
   11. Buttons
   12. Forms
   13. Notifications
   14. Administration Panels
   15. Dashboard Statistics
   16. Tables
   17. Footer
   18. Accessibility
   19. Responsive Layouts
   20. PWA Installation Footer Component
   ============================================================ */


/* ============================================================
   01. DESIGN TOKENS
   ============================================================ */

:root {
    /* Brand colours */
    --jmed-black: #080B0D;
    --jmed-black-soft: #111619;
    --jmed-charcoal: #171C20;
    --jmed-charcoal-light: #20282D;

    --jmed-blue: #1AAED2;
    --jmed-blue-hover: #36C4E5;
    --jmed-blue-dark: #118BA9;
    --jmed-blue-soft: rgba(26, 174, 210, 0.10);
    --jmed-blue-border: rgba(26, 174, 210, 0.30);

    /* Text */
    --text-primary: #F5F7F8;
    --text-secondary: #B3BEC5;
    --text-muted: #8999A3;
    --text-dark: #080B0D;

    /* Backgrounds */
    --background-main: var(--jmed-black);
    --background-secondary: var(--jmed-black-soft);
    --background-card: var(--jmed-charcoal);
    --background-hover: var(--jmed-charcoal-light);

    /* Borders */
    --border-primary: #303A40;
    --border-secondary: #263037;

    /* Feedback */
    --success: #43D69A;
    --success-background: rgba(67, 214, 154, 0.10);

    --danger: #FF7777;
    --danger-background: rgba(255, 119, 119, 0.12);

    --warning: #F2BF63;

    /* Layout */
    --container-width: 1200px;

    --radius-small: 6px;
    --radius-medium: 12px;
    --radius-large: 18px;
    --radius-xl: 28px;

    /* Effects */
    --shadow-card: 0 12px 35px rgba(0, 0, 0, 0.20);
    --shadow-hover: 0 18px 45px rgba(0, 0, 0, 0.35);

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;

    color-scheme: dark;
}


/* ============================================================
   02. GLOBAL RESET
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    background: var(--background-main);
    color: var(--text-primary);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

::selection {
    background: var(--jmed-blue);
    color: var(--jmed-black);
}


/* ============================================================
   03. TYPOGRAPHY & LINKS
   ============================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -1.5px;
}

h2 {
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.8px;
}

h3 {
    font-size: 19px;
}

p {
    margin-top: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--jmed-blue);
}

small,
.muted {
    color: var(--text-muted);
}

strong {
    font-weight: 700;
}


/* ============================================================
   04. ANNOUNCEMENT BAR
   ============================================================ */

.bar {
    padding: 10px 20px;

    background: var(--jmed-blue);
    color: var(--jmed-black);

    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.bar a {
    color: inherit;
    text-decoration: underline;
}

.bar a:hover {
    color: var(--jmed-black);
}


/* ============================================================
   05. NAVIGATION
   ============================================================ */

.nav {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 22px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;

    color: var(--text-primary);

    font-size: 34px;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;

    cursor: pointer;
    user-select: none;
}

.logo span {
    color: var(--jmed-blue);
}

.logo:hover {
    color: var(--text-primary);
}

/* Supports the existing JMED image logo */
.logo img,
.jmed-logo-img {
    display: block;
    width: auto;
    max-width: 180px;
    max-height: 60px;
    object-fit: contain;
}

.navlinks {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;

    font-size: 14px;
    font-weight: 600;
}

.navlinks a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.navlinks a:hover,
.navlinks a:focus-visible {
    color: var(--jmed-blue);
}


/* ============================================================
   06. HERO SECTION
   ============================================================ */

.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 40px;

    min-height: 430px;

    padding:
        65px
        max(24px, calc((100vw - 1160px) / 2));

    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(26, 174, 210, 0.12),
            transparent 40%
        ),
        linear-gradient(
            135deg,
            #10171B 0%,
            #080B0D 100%
        );

    border-top: 1px solid var(--border-secondary);
    border-bottom: 1px solid var(--border-secondary);
}

.hero h1 {
    margin: 15px 0 20px;

    font-size: clamp(38px, 5vw, 70px);
    line-height: 1.05;
    letter-spacing: -2px;
}

.hero em {
    color: var(--jmed-blue);
    font-style: normal;
}

.hero p {
    max-width: 460px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.eyebrow {
    color: var(--jmed-blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-art {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    height: 320px;
    overflow: hidden;

    border: 1px solid var(--jmed-blue-border);
    border-radius: 32px;

    background:
        radial-gradient(
            circle at 70% 25%,
            rgba(26, 174, 210, 0.25),
            transparent 55%
        ),
        linear-gradient(
            145deg,
            #1D3039,
            #0A1115
        );

    color: var(--jmed-blue);
    font-size: 130px;
}

.hero-art span {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
}


/* ============================================================
   07. LAYOUT & SECTIONS
   ============================================================ */

.wrap {
    width: 100%;
    max-width: var(--container-width);

    margin: 55px auto;
    padding: 0 20px;
}

.narrow {
    max-width: 740px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.section-title h2 {
    margin-bottom: 0;
}


/* ============================================================
   08. PRODUCT CATEGORIES
   ============================================================ */

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin: 20px 0 45px;
}

.categories a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 11px 20px;

    border: 1px solid var(--border-primary);
    border-radius: 25px;

    background: var(--background-card);
    color: var(--text-secondary);

    font-size: 14px;
    font-weight: 600;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast);
}

.categories a:hover,
.categories a:focus-visible {
    border-color: var(--jmed-blue);
    background: var(--jmed-blue-soft);
    color: var(--jmed-blue);
}


/* ============================================================
   09. PRODUCT GRID & CARDS
   ============================================================ */

.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;

    margin: 24px 0;
}

.product {
    min-width: 0;
    overflow: hidden;

    border: 1px solid var(--border-secondary);
    border-radius: 13px;

    background: var(--background-card);

    box-shadow: var(--shadow-card);

    transition:
        transform var(--transition-normal),
        border-color var(--transition-normal),
        box-shadow var(--transition-normal);
}

.product:hover {
    transform: translateY(-5px);
    border-color: var(--jmed-blue-border);
    box-shadow: var(--shadow-hover);
}

.product-img {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 230px;
    overflow: hidden;

    background: #20282D;
    color: var(--jmed-blue);

    font-size: 75px;
}

.product-img img,
.detail-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 18px;
}

.product-info small {
    color: var(--text-muted);
}

.product-info h3 {
    min-height: 45px;
    margin: 10px 0;

    color: var(--text-primary);
    font-size: 17px;
    line-height: 1.4;
}

.product-info strong {
    color: var(--jmed-blue);
    font-size: 18px;
}


/* ============================================================
   10. PRODUCT DETAILS
   ============================================================ */

.detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.detail-img {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 400px;
    overflow: hidden;

    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-large);

    background: var(--background-card);
    color: var(--jmed-blue);

    font-size: 90px;
}


/* ============================================================
   11. BUTTONS & ACTIONS
   ============================================================ */

.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 13px 22px;

    border: 1px solid transparent;
    border-radius: var(--radius-small);

    background: var(--jmed-blue);
    color: var(--jmed-black);

    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;

    cursor: pointer;

    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.btn:hover,
button:hover {
    background: var(--jmed-blue-hover);
    color: var(--jmed-black);

    transform: translateY(-1px);

    box-shadow: 0 5px 20px rgba(26, 174, 210, 0.18);
}

.btn:active,
button:active {
    transform: translateY(0);
}

.small {
    margin-top: 16px;
    padding: 10px 15px;
    font-size: 13px;
}

/* Optional secondary action styling */
.btn-secondary {
    border-color: var(--jmed-blue);
    background: transparent;
    color: var(--jmed-blue);
}

.btn-secondary:hover {
    background: var(--jmed-blue-soft);
    color: var(--jmed-blue-hover);
}

/* Optional destructive action styling */
.btn-danger {
    border-color: var(--danger);
    background: var(--danger-background);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: var(--jmed-black);
}


/* ============================================================
   12. FORMS & INPUTS
   ============================================================ */

.form {
    display: grid;
    gap: 16px;
    max-width: 640px;
}

.form label {
    display: grid;
    gap: 7px;

    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    max-width: 100%;

    padding: 12px 14px;

    border: 1px solid var(--border-primary);
    border-radius: var(--radius-small);

    background: var(--background-secondary);
    color: var(--text-primary);

    font-size: 14px;
    line-height: 1.5;

    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

input:hover,
textarea:hover,
select:hover {
    border-color: #53636D;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;

    border-color: var(--jmed-blue);

    box-shadow:
        0 0 0 3px rgba(26, 174, 210, 0.14);
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    accent-color: var(--jmed-blue);
}

input[type="file"] {
    padding: 10px;
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 9px 13px;

    border: 1px solid var(--border-primary);
    border-radius: var(--radius-small);

    background: var(--jmed-charcoal-light);
    color: var(--text-primary);

    cursor: pointer;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select option {
    background: var(--background-card);
    color: var(--text-primary);
}

.form button {
    justify-self: start;
}

/* Improve password and OTP input readability */
input[type="password"],
input[autocomplete="one-time-code"] {
    letter-spacing: 0.5px;
}


/* ============================================================
   13. NOTIFICATIONS & MESSAGES
   ============================================================ */

.notice {
    max-width: 1160px;
    margin: 20px auto;
    padding: 16px 20px;

    border: 1px solid rgba(67, 214, 154, 0.35);
    border-left: 4px solid var(--success);
    border-radius: var(--radius-small);

    background: var(--success-background);
    color: #A7F2CF;
}

.error {
    margin: 15px 0;
    padding: 14px 18px;

    border: 1px solid rgba(255, 119, 119, 0.35);
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-small);

    background: var(--danger-background);
    color: #FFB1B1;
}


/* ============================================================
   14. ADMINISTRATION PANELS
   ============================================================ */

.panel {
    margin-top: 22px;
    padding: 24px;

    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-medium);

    background: var(--background-card);
    box-shadow: var(--shadow-card);
}

.panel h2,
.panel h3 {
    margin-bottom: 15px;
}

.panel p {
    color: var(--text-secondary);
}

/* Forms inside administration panels */
.panel .form {
    max-width: 100%;
}

/* Links inside panels */
.panel a:not(.btn) {
    color: var(--jmed-blue);
}

.panel a:not(.btn):hover {
    color: var(--jmed-blue-hover);
}


/* ============================================================
   15. DASHBOARD STATISTICS
   ============================================================ */

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;

    margin: 30px 0;
}

.stats div {
    display: grid;
    align-content: center;
    gap: 8px;

    min-height: 125px;
    padding: 25px;

    border: 1px solid var(--border-secondary);
    border-radius: 9px;

    background: var(--background-card);

    transition:
        border-color var(--transition-fast),
        transform var(--transition-fast);
}

.stats div:hover {
    border-color: var(--jmed-blue-border);
    transform: translateY(-2px);
}

.stats strong {
    color: var(--text-primary);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
}

.stats span {
    color: var(--text-secondary);
    font-size: 13px;
}


/* ============================================================
   16. TABLES
   ============================================================ */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    margin: 20px 0;

    border-collapse: collapse;
    border-spacing: 0;
}

th,
td {
    padding: 14px 13px;

    border-bottom: 1px solid var(--border-secondary);

    text-align: left;
    vertical-align: middle;

    font-size: 14px;
}

th {
    background: var(--jmed-charcoal-light);
    color: var(--text-primary);

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

td {
    color: var(--text-secondary);
}

tbody tr {
    transition: background var(--transition-fast);
}

tbody tr:hover {
    background: rgba(26, 174, 210, 0.05);
}

td a {
    color: var(--jmed-blue);
    font-weight: 600;
}

td a:hover {
    color: var(--jmed-blue-hover);
}

/* Make empty tables easier to read */
td:only-child {
    line-height: 1.6;
}


/* ============================================================
   17. FOOTER
   ============================================================ */

footer {
    display: grid;
    gap: 12px;

    margin-top: 90px;

    padding:
        35px
        max(20px, calc((100vw - 1160px) / 2));

    border-top: 1px solid var(--border-secondary);

    background: #06090B;
    color: var(--text-secondary);

    font-size: 14px;
}

footer a {
    color: var(--text-secondary);
}

footer a:hover {
    color: var(--jmed-blue);
}


/* ============================================================
   18. ACCESSIBILITY & USABILITY
   ============================================================ */

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--jmed-blue);
    outline-offset: 3px;
}

/* Avoid horizontal page overflow */
body {
    overflow-wrap: break-word;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* ============================================================
   19. RESPONSIVE LAYOUTS
   ============================================================ */

/* Tablets and smaller laptops */
@media (max-width: 850px) {

    .products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero,
    .detail {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 45px 24px;
    }

    .hero-art {
        height: 220px;
        font-size: 80px;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav {
        padding: 18px 20px;
    }

    .navlinks {
        gap: 16px;
    }

    .detail-img {
        min-height: 300px;
    }
}


/* Mobile phones */
@media (max-width: 600px) {

    .wrap {
        margin: 35px auto;
        padding: 0 16px;
    }

    .nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .navlinks {
        width: 100%;
        gap: 12px 18px;
    }

    .logo {
        font-size: 30px;
    }

    .logo img,
    .jmed-logo-img {
        max-width: 150px;
        max-height: 52px;
    }

    .hero {
        gap: 25px;
        padding: 35px 20px;
    }

    .hero h1 {
        font-size: clamp(34px, 9vw, 48px);
    }

    .hero-art {
        height: 190px;
        border-radius: 20px;
        font-size: 70px;
    }

    .hero-art span {
        font-size: 18px;
    }

    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .products {
        gap: 14px;
    }

    .product-img {
        height: 185px;
    }

    .product-info {
        padding: 14px;
    }

    .product-info h3 {
        font-size: 15px;
    }

    .detail {
        gap: 25px;
    }

    .panel {
        padding: 18px;
    }

    th,
    td {
        padding: 11px 10px;
        font-size: 13px;
    }

    footer {
        margin-top: 60px;
        padding: 30px 20px;
    }
}


/* Small mobile phones */
@media (max-width: 450px) {

    .products {
        grid-template-columns: 1fr;
    }

    .product-img {
        height: 240px;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .stats div {
        min-height: 100px;
        padding: 20px;
    }

    .categories {
        gap: 9px;
    }

    .categories a {
        padding: 9px 14px;
        font-size: 12px;
    }

    .form button {
        width: 100%;
        justify-self: stretch;
    }

    .btn,
    button {
        min-height: 44px;
    }
}


/* ============================================================
   20. PWA INSTALLATION FOOTER COMPONENT
   Uses the locked JMED palette. Does not change global styles.
   Requires footer markup and assets/pwa-install.js.
   ============================================================ */

.jmed-pwa-install {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 18px;
}

.jmed-pwa-install-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: auto;
    min-height: 50px;
    padding: 10px 18px;
    border: 1px solid var(--jmed-blue);
    border-radius: 10px;
    background: var(--jmed-blue);
    color: var(--jmed-black);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.jmed-pwa-install-button:hover {
    background: var(--jmed-blue-hover);
    color: var(--jmed-black);
    transform: translateY(-1px);
}

.jmed-pwa-install-button img {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}

.jmed-pwa-install-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
}

.jmed-pwa-install-instructions {
    flex-basis: 100%;
    width: 100%;
    max-width: 420px;
    padding: 14px 16px;
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    background: var(--background-card);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.7;
}

.jmed-pwa-install-button[hidden],
.jmed-pwa-install-instructions[hidden] {
    display: none !important;
}

@media (max-width: 600px) {
    .jmed-pwa-install {
        flex-direction: column;
        align-items: stretch;
    }

    .jmed-pwa-install-button {
        width: 100%;
    }
}
