/*
 * SEDETEC visual theme for the osTicket client portal.
 * Load this from Admin Panel > Settings > System > Custom CSS.
 * The stylesheet changes presentation only; it does not hide or replace
 * osTicket navigation, forms, account controls, ticket actions, or notices.
 */

:root {
    --sedetec-ink: #111111;
    --sedetec-text: #242424;
    --sedetec-muted: #6b6b6b;
    --sedetec-paper: #ffffff;
    --sedetec-canvas: #f7f7f7;
    --sedetec-border: #e5e5e5;
    --sedetec-radius: 8px;
}

html,
body {
    min-height: 100%;
    background: var(--sedetec-canvas) !important;
    color: var(--sedetec-text);
    font-family: Arial, Helvetica, sans-serif;
}

body {
    margin: 0;
    line-height: 1.6;
}

body h1,
body h2,
body h3 {
    color: var(--sedetec-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    line-height: 1.3;
}

/* Full-width portal canvas; osTicket content stays centered and responsive. */
#container {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0 24px;
    background: transparent;
    box-shadow: none;
}

#header {
    position: relative;
    z-index: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 1240px;
    min-height: 88px;
    margin: 0 auto;
    padding: 14px 28px;
    background: var(--sedetec-ink);
    border: 0;
}

#header::before {
    position: absolute;
    z-index: -1;
    top: 0;
    right: calc((100% - 100vw) / 2);
    bottom: 0;
    left: calc((100% - 100vw) / 2);
    background: var(--sedetec-ink);
    content: "";
}

#header a,
#header #info,
#header #info a,
#header .pull-right,
#header .pull-right a,
#header #logo {
    color: #ffffff !important;
}

#header #logo {
    display: inline-flex;
    align-items: center;
    min-height: 56px;
    font-size: 0;
}

#header #logo img {
    display: block;
    width: auto;
    max-width: min(310px, 55vw);
    max-height: 58px;
    filter: none;
    object-fit: contain;
}

#header #info {
    color: #f1f1f1 !important;
}

#header #info a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Keep the native osTicket navigation visible, using the light site palette. */
#nav {
    box-sizing: border-box;
    width: 100%;
    max-width: 1240px;
    min-height: 52px;
    margin: 0 auto;
    padding: 7px 18px;
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid var(--sedetec-border);
    box-shadow: none;
}

#nav a {
    display: inline-block;
    box-sizing: border-box;
    padding: 8px 12px 8px 30px;
    color: var(--sedetec-text) !important;
    border-radius: 5px;
    background-repeat: no-repeat !important;
    background-position: 8px center !important;
    white-space: nowrap;
}

#nav li {
    float: none;
    display: inline-block;
    margin-right: 6px;
}

#nav a:hover,
#nav a.active,
#nav a.selected {
    color: var(--sedetec-ink) !important;
    background-color: #eeeeee;
    background-repeat: no-repeat !important;
    background-position: 8px center !important;
}

#content {
    box-sizing: border-box;
    width: 100%;
    max-width: 1240px;
    min-height: 420px;
    margin: 34px auto 58px;
    padding: 36px 42px;
    overflow-wrap: anywhere;
    background: var(--sedetec-paper);
    border: 0;
    border-radius: var(--sedetec-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .045);
    color: var(--sedetec-text);
}

#content form,
.main-content {
    color: var(--sedetec-text);
}

#landing_page {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

#landing_page h1,
#content h1,
#landing_page h2,
#content h2,
#landing_page h3,
#content h3 {
    color: var(--sedetec-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    line-height: 1.25;
}

#landing_page h1,
#content h1 {
    margin-top: 0;
    font-size: clamp(28px, 3vw, 40px);
}

#landing_page h2,
#content h2 {
    margin-top: 32px;
    font-size: clamp(22px, 2.3vw, 30px);
}

#landing_page p,
#content p,
#landing_page li,
#content li {
    font-size: 16px;
    line-height: 1.75;
}

.sidebar {
    box-sizing: border-box;
}

.front-page-button p {
    margin: 0 0 12px;
}

.button,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    border: 1px solid var(--sedetec-ink) !important;
    border-radius: 5px !important;
    background: var(--sedetec-ink) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 500;
    transition: background-color .15s ease, border-color .15s ease;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
    border-color: #383838 !important;
    background: #383838 !important;
    color: #ffffff !important;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
select,
textarea {
    box-sizing: border-box;
    max-width: 100%;
    border: 1px solid #d2d2d2 !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    color: var(--sedetec-text) !important;
    box-shadow: none !important;
    font: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    border-color: #777777 !important;
    outline: 2px solid rgba(17, 17, 17, .12);
    outline-offset: 1px;
}

table.custom-data,
table.infoTable,
table.list {
    width: 100%;
    border-collapse: collapse;
    border-color: var(--sedetec-border);
}

#content table {
    box-sizing: border-box;
    max-width: 100%;
}

#ticketForm > table {
    width: 100% !important;
}

table.custom-data th,
table.custom-data td,
table.infoTable th,
table.infoTable td,
table.list th,
table.list td {
    padding: 11px 12px;
    border-color: var(--sedetec-border);
}

table.custom-data thead th,
table.list thead th,
table.infoTable .headline,
table.custom-data .headline {
    background: #f3f3f3;
    color: var(--sedetec-ink);
    font-weight: 600;
}

#msg_notice,
#msg_warning,
#msg_error {
    box-sizing: border-box;
    height: auto;
    min-height: 34px;
    padding-top: 8px;
    padding-bottom: 8px;
    border-radius: 4px;
    line-height: 1.5;
}

#footer {
    box-sizing: border-box;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 24px 28px;
    border-top: 1px solid var(--sedetec-border);
    background: var(--sedetec-canvas);
    color: var(--sedetec-muted);
    text-align: left;
}

.sedetec-footer-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(120px, 1fr));
    gap: 32px;
    align-items: start;
    padding-bottom: 28px;
}

.sedetec-footer-brand img {
    display: block;
    width: min(250px, 100%);
    height: auto;
    filter: invert(1);
}

.sedetec-footer-group h2 {
    margin: 0 0 12px;
    color: var(--sedetec-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 700;
}

.sedetec-footer-group a {
    display: block;
    margin: 0 0 8px;
    color: var(--sedetec-muted) !important;
    text-decoration: none;
}

.sedetec-footer-group a:hover {
    color: var(--sedetec-ink) !important;
    text-decoration: underline;
}

.sedetec-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding-top: 16px;
    border-top: 1px solid var(--sedetec-border);
    color: #999999;
    font-size: 13px;
}

#footer a,
#poweredBy a {
    color: var(--sedetec-text);
}

#footer a:hover,
#poweredBy a:hover {
    color: var(--sedetec-ink);
    text-decoration: underline;
}

#poweredBy {
    color: var(--sedetec-muted);
}

@media (max-width: 760px) {
    #container {
        padding: 0 12px;
    }

    #header {
        min-height: 72px;
        padding: 10px 16px;
    }

    #header::before {
        right: -12px;
        left: -12px;
    }

    #header #logo img {
        max-width: min(230px, 52vw);
        max-height: 48px;
    }

    #nav {
        padding: 6px 8px;
    }

    #content {
        min-height: 0;
        margin: 18px auto 32px;
        padding: 24px 18px;
    }

    #landing_page {
        padding: 0;
    }

    #landing_page .sidebar,
    #landing_page .main-content {
        float: none;
        width: 100%;
    }

    #landing_page .sidebar {
        margin-bottom: 24px;
    }

    table.custom-data th,
    table.custom-data td,
    table.infoTable th,
    table.infoTable td,
    table.list th,
    table.list td {
        padding: 8px;
    }

    #footer {
        padding: 18px 10px 24px;
    }

    .sedetec-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 18px;
    }

    .sedetec-footer-brand {
        grid-column: 1 / -1;
    }

    .sedetec-footer-brand img {
        width: min(220px, 75%);
    }

    .sedetec-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}
