/* ======================================================
   KOODE WHMCS THEME
   ====================================================== */

/* Perusvärit */

body {
    background: #f4f7fb !important;
}

#main-body {
    background:
        radial-gradient(circle at 20% 10%, rgba(255,122,24,.10), transparent 28%),
        radial-gradient(circle at 80% 20%, rgba(175,44,255,.12), transparent 30%),
        #f3f6fb !important;
}

/* Header */

.header .navbar-light {
    background: linear-gradient(
        135deg,
        #ff7a18 0%,
        #ff4d6d 30%,
        #af2cff 65%,
        #2f80ed 100%
    ) !important;
}

.navbar-brand {
    color: #fff !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

.main-navbar-wrapper {
    background: #fff !important;
}

.main-navbar-wrapper a {
    color: #4b5563 !important;
}

.main-navbar-wrapper a:hover {
    color: #6f42c1 !important;
}

/* Footer */

.footer {
    background: #111827 !important;
    color: #fff !important;
}

.footer a,
.footer .nav-link {
    color: #fff !important;
}

/* Papu hero */

.papu-card {
    background: linear-gradient(
        135deg,
        #ff7a18,
        #ff4d6d,
        #af2cff,
        #2f80ed
    );
    color: #fff;
    border-radius: 28px;
    padding: 42px;
    margin-bottom: 28px;
    box-shadow: 0 18px 45px rgba(0,0,0,.14);
}

.papu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
}

.papu-content h2 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.papu-content h1 {
    color: #fff;
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 16px;
}

.papu-content p {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.papu-lead {
    font-size: 1.25rem !important;
    font-weight: 700;
}

.papu-actions {
    margin-top: 22px;
}

.papu-actions .btn {
    border-radius: 999px;
    padding: 11px 22px;
    margin-right: 10px;
    font-weight: 600;
    border: 0;
}

.papu-avatar {
    width: 300px;
    min-width: 300px;
    height: auto;
    background: transparent !important;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.papu-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 18px 28px rgba(0,0,0,.25));
}

/* Ajankohtaista */

.koode-announcement-card {
    background: #fff;
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.koode-announcement-card h2 {
    margin-top: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.koode-announcement-card h3 {
    font-size: 1.25rem;
    margin: 8px 0 12px 0;
}

.koode-announcement-card p {
    color: #4b5563;
    line-height: 1.6;
}

.koode-announcement-date {
    color: #6b7280;
    font-size: .9rem;
    margin-top: 8px;
}

.koode-announcement-card .btn {
    border-radius: 999px;
    padding: 10px 22px;
}

/* Sidebar */

.sidebar .card-sidebar {
    border: 0 !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08) !important;
    margin-bottom: 22px !important;
}

.sidebar .card-sidebar .card-header {
    background: linear-gradient(135deg, #ff7a18, #af2cff) !important;
    border-bottom: 0 !important;
    padding: 15px 18px !important;
}

.sidebar .card-sidebar .card-title,
.sidebar .card-sidebar .card-title i,
.sidebar .card-sidebar .card-minimise {
    color: #ffffff !important;
}

.sidebar .card-sidebar .card-title {
    font-size: 15px !important;
    font-weight: 700 !important;
}

.sidebar .card-sidebar .card-body {
    background: #ffffff !important;
    padding: 18px !important;
}

.sidebar .card-sidebar .list-group-item {
    background: #ffffff !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-color: #eef2f7 !important;
    padding: 12px 16px !important;
}

.sidebar .card-sidebar .list-group-item:hover {
    background: linear-gradient(135deg, rgba(255,122,24,.08), rgba(175,44,255,.08)) !important;
}

.sidebar .card-sidebar .card-footer {
    background: #ffffff !important;
    border-top: 1px solid #eef2f7 !important;
    padding: 14px 18px !important;
}

.sidebar .card-sidebar .btn {
    border-radius: 999px !important;
    font-weight: 600 !important;
}

.sidebar .card-sidebar .btn-success {
    background: #22c55e !important;
    border-color: #22c55e !important;
    color: #fff !important;
}

.sidebar .card-sidebar .btn-success:hover {
    background: #16a34a !important;
    border-color: #16a34a !important;
}

.sidebar .card-sidebar .sidebar-menu-item-icon {
    color: #af2cff !important;
}

/* Responsiivisuus */

@media (max-width: 768px) {
    .papu-row {
        flex-direction: column;
        text-align: center;
    }

    .papu-content h1 {
        font-size: 2.2rem;
    }

    .papu-avatar {
        width: 150px;
        min-width: 150px;
    }

    .papu-image {
        max-width: 150px;
    }
}

/* ==============================
   Koode public homepage
   ============================== */

.koode-public-home {
    padding: 32px 0 56px;
}

.papu-public {
    margin-bottom: 36px;
}

.papu-public .papu-content h1 {
    margin-bottom: 16px;
}

.papu-public .papu-content p {
    max-width: 620px;
    font-size: 1.05rem;
    line-height: 1.65;
}

.papu-kicker {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.85;
}

.papu-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.papu-image img {
    max-width: 260px;
    width: 100%;
    height: auto;
    display: block;
}

/* ==============================
   Koode public homepage
   ============================== */

:root {
    --koode-card-radius: 16px;
    --koode-card-pad-x: 24px;
    --koode-card-pad-y: 22px;
    --koode-card-header-y: 15px;
    --koode-gradient: linear-gradient(135deg, #ec4899 0%, #7c3aed 100%);
}

.koode-public-home {
    padding: 32px 0 56px;
}

.papu-public {
    margin-bottom: 28px;
}

.papu-public .papu-content h1 {
    margin-bottom: 16px;
}

.papu-public .papu-content p {
    max-width: 620px;
    font-size: 1.05rem;
    line-height: 1.65;
}

.papu-kicker {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.85;
}

.papu-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.papu-image img {
    max-width: 260px;
    width: 100%;
    height: auto;
    display: block;
}

/* Shared card styling */

.koode-action-card,
.koode-news-card,
.koode-small-link-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--koode-card-radius);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.075);
    overflow: hidden;
}

.koode-action-card,
.koode-small-link-card {
    display: block;
    height: 100%;
    padding: 0 var(--koode-card-pad-x) var(--koode-card-pad-y);
    color: #111827;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.koode-action-card:hover,
.koode-action-card:focus,
.koode-small-link-card:hover,
.koode-small-link-card:focus {
    color: #111827;
    text-decoration: none;
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.11);
}

.koode-action-card {
    display: flex;
    flex-direction: column;
}

.koode-action-card p {
    margin: 0 0 18px;
}

.koode-action-card span {
    display: block;
    margin-top: auto;
    font-weight: 700;
    color: #7c3aed;
}

/* Shared card headers */

.koode-action-card h3,
.koode-small-link-card strong,
.koode-news-label {
    display: block;
    margin: 0 calc(var(--koode-card-pad-x) * -1) 18px;
    padding: var(--koode-card-header-y) var(--koode-card-pad-x);
    background: var(--koode-gradient);
    color: #ffffff;
    font-size: 1.02rem;
    font-weight: 750;
    line-height: 1.25;
}

.koode-news-label {
    margin: 0;
}

/* Main action cards */

.koode-public-actions {
    margin: 0 0 18px;
}

.koode-action-card p {
    margin: 0 0 18px;
    color: #4b5563;
    line-height: 1.55;
}

.koode-action-card span {
    font-weight: 700;
    color: #7c3aed;
}

/* Public news card */

.koode-public-news {
    margin: 0 0 18px;
}

.koode-news-card h2 {
    margin: 20px var(--koode-card-pad-x) 12px;
    font-size: 1.25rem;
    font-weight: 750;
    color: #111827;
}

.koode-news-card p {
    max-width: 760px;
    margin: 0 var(--koode-card-pad-x) 18px;
    color: #4b5563;
    line-height: 1.6;
}

.koode-news-link {
    display: inline-block;
    margin: 0 var(--koode-card-pad-x) var(--koode-card-pad-y);
    font-weight: 700;
    color: #7c3aed;
    text-decoration: none;
}

.koode-news-link:hover,
.koode-news-link:focus {
    color: #ec4899;
    text-decoration: none;
}

/* Small link cards */

.koode-public-links {
    margin-top: 0;
}

.koode-small-link-card {
    min-height: 132px;
}

.koode-small-link-card span {
    display: block;
    color: #6b7280;
    line-height: 1.45;
}

/* Mobile */

@media (max-width: 767.98px) {
    :root {
        --koode-card-pad-x: 22px;
        --koode-card-pad-y: 20px;
        --koode-card-header-y: 14px;
    }

    .koode-public-home {
        padding: 20px 0 40px;
    }

    .papu-actions {
        flex-direction: column;
    }

    .papu-actions .btn {
        width: 100%;
    }

    .papu-image {
        margin-top: 24px;
        text-align: center;
    }

    .papu-image img {
        max-width: 220px;
        margin: 0 auto;
    }

    .koode-small-link-card {
        min-height: 120px;
    }
}

/* ==============================
   Koode orderform
   ============================== */

#order-standard_cart .sidebar-collapsed-categories,
#order-standard_cart .sidebar-collapsed-actions,
#order-standard_cart .sidebar-collapsed-currency {
    color: #111827;
}

#order-standard_cart .sidebar .panel,
#order-standard_cart .sidebar .card {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

#order-standard_cart .sidebar .panel-heading,
#order-standard_cart .sidebar .card-header,
#order-standard_cart .sidebar-collapsed-categories,
#order-standard_cart .sidebar-collapsed-actions,
#order-standard_cart .sidebar-collapsed-currency {
    background: linear-gradient(135deg, #ec4899 0%, #7c3aed 100%);
    color: #ffffff;
    border: 0;
}

#order-standard_cart .sidebar a,
#order-standard_cart .list-group-item {
    color: #374151;
}

#order-standard_cart .sidebar a:hover,
#order-standard_cart .list-group-item:hover {
    color: #7c3aed;
    text-decoration: none;
}

#order-standard_cart .products {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
}

#order-standard_cart .products .product {
    flex: 1 1 320px;
    max-width: 100%;
    margin: 0;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

#order-standard_cart .products .product header,
#order-standard_cart .products .product .header {
    padding: 16px 22px;
    background: linear-gradient(135deg, #ec4899 0%, #7c3aed 100%);
    color: #ffffff;
}

#order-standard_cart .products .product header span,
#order-standard_cart .products .product .header span {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
}

#order-standard_cart .products .product .product-desc,
#order-standard_cart .products .product .description {
    padding: 22px;
    color: #4b5563;
    line-height: 1.55;
}

#order-standard_cart .products .product .price {
    color: #111827;
    font-size: 1.6rem;
    font-weight: 800;
}

#order-standard_cart .products .product .btn,
#order-standard_cart .btn-success {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #ec4899 0%, #7c3aed 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(124, 58, 237, 0.25);
}

#order-standard_cart .products .product .btn:hover,
#order-standard_cart .btn-success:hover {
    background: linear-gradient(135deg, #f43f5e 0%, #6d28d9 100%);
    color: #ffffff;
}

/* Koode-palvelut: 3 pakettia rinnakkain desktopilla */
#order-standard_cart .products.koode-order-products {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
}

#order-standard_cart .products.koode-order-products > .row {
    display: contents !important;
}

#order-standard_cart .products.koode-order-products > .row > [class*="col-"] {
    flex: 0 0 calc(33.333% - 16px) !important;
    max-width: calc(33.333% - 16px) !important;
    width: calc(33.333% - 16px) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 0 !important;
}

#order-standard_cart .products.koode-order-products .product {
    height: 100% !important;
}

@media (max-width: 991.98px) {
    #order-standard_cart .products.koode-order-products > .row > [class*="col-"] {
        flex: 0 0 calc(50% - 12px) !important;
        max-width: calc(50% - 12px) !important;
        width: calc(50% - 12px) !important;
    }
}

@media (max-width: 575.98px) {
    #order-standard_cart .products.koode-order-products > .row > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}