/* ====================================
   ArtRisk Custom Design System
   ==================================== */

/* Base Styles */
body {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    color: #060b48;
    background-color: #ffffff;
}

@media (min-width: 992px) {
    html { font-size: 12px; }
}

@media (min-width: 1600px) {
    html { font-size: 14px; }
}

/* ====================================
   Layout - Sidebar
   ==================================== */
body.has-sidebar {
    padding-left: 15rem;
}

@media screen and (max-width: 992px) {
    body.has-sidebar {
        padding-left: 0;
    }
}

.sidebar {
    display: flex;
    flex-flow: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 15rem;
    height: 100vh;
    background-color: #050d6e;
    padding: 2rem 2.5rem;
    padding-bottom: 2rem;
    padding-top: 2rem;
    color: #fff;
    overflow-y: auto;
    scrollbar-color: #bcc1ff #050d6e;
    scrollbar-width: thin;
}

.sidebar .logo {
    text-align: center;
    margin-bottom: 2rem;
}

.sidebar .logo img {
    max-width: 75%;
}

.sidebar .nav-content {
    overflow-y: auto;
    padding-left: 0;
    padding-right: 0;
    color: #fff;
}

.sidebar a {
    display: inline-block;
    color: #bcc1ff;
    font-weight: 400;
    padding: 0.15rem 1rem 0.15rem 0;
}

.sidebar a:hover {
    color: #a3a9ff;
    text-decoration: none;
}

.sidebar a.active {
    color: #ade552;
    font-weight: 700;
}

.sidebar h3 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar h3:not(:first-of-type) {
    margin-top: 1.5rem;
}

.sidebar h3:hover {
    color: #ade552;
}

/* ====================================
   Page Header
   ==================================== */
.page-header {
    position: sticky;
    top: 0;
    height: 80px;
    width: 100%;
    background-color: #fff;
    z-index: 10;
    display: flex;
    align-items: center;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0;
    padding-bottom: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

@media (min-width: 1200px) {
    .page-header {
        padding-left: 2.8125rem;
        padding-right: 2.8125rem;
    }
}

.page-header h1 {
    margin-bottom: 0;
    color: #060b48;
}

.page-header aside,
.page-header .user-dropdown-toggle {
    display: flex;
    align-items: center;
}

.page-header .user-dropdown-toggle {
    border-radius: 1.625rem;
    padding: 0.8125rem 0.5rem;
    font-weight: 700;
    flex-wrap: nowrap;
    background: transparent;
    border: none;
    color: #060b48;
}

.page-header .user-dropdown-toggle:hover {
    background-color: #eef2f9;
}

.page-header .user-dropdown-toggle::after {
    margin-left: 0.5rem;
}

.page-header .user-dropdown-toggle .avatar {
    margin-right: 0.875rem;
}

.page-header .icons {
    margin-right: 2rem;
}

.page-header .icons a {
    color: #050d6e;
    padding: 0.25rem 0.78125rem;
}

.page-header .icons a:hover {
    text-decoration: none;
    color: #0814a9;
}

.page-header .icons a .fai {
    font-size: 1.2rem;
    line-height: 1.3;
}

/* ====================================
   Main Content
   ==================================== */
main {
    padding: 1.5rem 1rem;
}

@media (min-width: 1200px) {
    main {
        padding-left: 2.8125rem;
        padding-right: 2.8125rem;
    }
}

.page-header + main {
    padding-top: 1.5rem;
}

/* ====================================
   Cards
   ==================================== */
.card {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    box-shadow: 0px 0.1875rem 0.625rem rgba(136, 145, 193, 0.21);
    margin-bottom: 1.5rem;
    background: #fff;
}

.card-header {
    background-color: #fafbfd;
    border-bottom: 1px solid #dee2e6;
    font-weight: 700;
    color: #060b48;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.card-title {
    margin-bottom: 0.75rem;
    color: #060b48;
}

/* ====================================
   Buttons
   ==================================== */
.btn {
    font-weight: 700;
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
}

.btn-primary {
    background-color: #ade552;
    border-color: #ade552;
    color: #060b48;
}

.btn-primary:hover {
    background-color: #9dd33d;
    border-color: #9dd33d;
    color: #060b48;
}

.btn-secondary {
    background-color: #050d6e;
    border-color: #050d6e;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #060b48;
    border-color: #060b48;
}

.btn-outline-primary {
    color: #ade552;
    border-color: #ade552;
}

.btn-outline-primary:hover {
    background-color: #ade552;
    border-color: #ade552;
    color: #060b48;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-circle {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ====================================
   Tables
   ==================================== */
.table {
    color: #060b48;
    width: 100%;
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #b6becb;
    font-weight: 700;
    color: #060b48;
    font-size: 0.875rem;
    text-transform: uppercase;
    padding: 0.75rem;
    vertical-align: bottom;
}

.table td {
    font-size: 0.875rem;
    color: #657591;
    padding: 0.75rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f4f7fb;
}

/* ====================================
   Badges
   ==================================== */
.badge {
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    display: inline-block;
}

.badge-success {
    background-color: #53c31c;
    color: #fff;
}

.badge-warning {
    background-color: #e5b852;
    color: #060b48;
}

.badge-danger {
    background-color: #ea3c78;
    color: #fff;
}

.badge-info {
    background-color: #bcc1ff;
    color: #060b48;
}

.badge-primary {
    background-color: #050d6e;
    color: #fff;
}

/* ====================================
   Avatars
   ==================================== */
.avatar {
    border-radius: 50%;
    overflow: hidden;
    background-color: #b6becb;
    margin-right: 0.5rem;
    display: inline-block;
    width: 100%;
    margin-bottom: 0;
    font-weight: 700;
}

.avatar.xs {
    font-size: 0.625rem;
    width: 20px;
    max-width: 20px;
    height: 20px;
}

.avatar.sm {
    font-size: 0.875rem;
    width: 30px;
    max-width: 30px;
    height: 30px;
}

.avatar.lg {
    font-size: 1.1875rem;
    width: 42px;
    max-width: 42px;
    height: 42px;
}

.avatar .initials {
    color: #fff;
    text-transform: uppercase;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.avatar img {
    display: flex;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ====================================
   Timeline / Activity Feed
   ==================================== */
.timeline {
    position: relative;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.625rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ade552;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #dee2e6;
}

.timeline-content {
    background-color: #fafbfd;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.timeline-user {
    font-weight: 700;
    color: #060b48;
}

.timeline-date {
    font-size: 0.75rem;
    color: #808495;
}

.timeline-text {
    color: #657591;
    font-size: 0.875rem;
}

/* ====================================
   Document List
   ==================================== */
.document-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 0.75rem;
    transition: background-color 0.2s;
}

.document-item:hover {
    background-color: #f4f7fb;
}

.document-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: #d5e1f0;
    color: #3068b2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.document-icon i {
    font-size: 1.25rem;
}

.document-info {
    flex-grow: 1;
}

.document-name {
    font-weight: 700;
    color: #060b48;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.document-meta {
    font-size: 0.75rem;
    color: #808495;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.document-actions .btn {
    padding: 0.25rem 0.5rem;
}

/* ====================================
   Detail View Container
   ==================================== */
.detailview-container {
    width: 100%;
    display: flex;
    flex-flow: column;
    flex-wrap: nowrap;
    box-shadow: 0px 0.1875rem 0.625rem rgba(136, 145, 193, 0.21);
    margin-bottom: 2rem;
    background: #fff;
}

@media screen and (min-width: 992px) {
    .detailview-container {
        flex-flow: row;
    }
}

.detailview-container dl {
    margin-bottom: 0;
}

.detailview-container dl dt {
    font-weight: 700;
    font-size: 0.75rem;
    margin-bottom: 0;
    color: #060b48;
}

.detailview-container dl dd {
    font-size: 0.75rem;
    margin-bottom: 0;
    color: #657591;
}

.detailview-container dl dd + dt {
    margin-top: 0.75rem;
}

.detailview-aside {
    flex: 0 0 20rem;
    border-right: 1px solid #dee2e6;
}

@media screen and (min-width: 1200px) {
    .detailview-aside {
        flex-basis: 25rem;
    }
}

.detailview-aside .detailview-header,
.detailview-aside .detailview-body {
    padding-left: 2.4rem;
    padding-right: 2.4rem;
}

.detailview-aside .detailview-header {
    min-height: 4.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
}

.detailview-aside .detailview-body {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.detailview-aside h4 {
    margin-top: 2rem;
    font-size: 1rem;
    color: #060b48;
}

.detailview-aside h4:first-child {
    margin-top: 0;
}

.detailview-primary {
    overflow: hidden;
    flex: 1 0;
}

.detailview-primary .detailview-header {
    min-height: 4.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: flex-start;
    background-color: #eef2f9;
    padding: 1rem 2rem;
}

.detailview-primary .detailview-body {
    padding: 1.8rem 3.375rem;
}

/* ====================================
   Notes
   ==================================== */
.note {
    box-shadow: 0px 0.1875rem 0.625rem rgba(136, 145, 193, 0.21);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: #fff;
}

.note .note-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.note .note-content {
    margin-bottom: 0.75rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #657591;
}

.note .note-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ====================================
   Utility Classes
   ==================================== */
.text-primary { color: #060b48 !important; }
.text-secondary { color: #657591 !important; }
.text-tertiary { color: #808495 !important; }
.text-light-gray { color: #c7c7d6 !important; }
.bg-secondary { background-color: #eef2f9 !important; }
.bg-tertiary { background-color: #fafbfd !important; }

.fw-bold { font-weight: 700; }
.fw-medium { font-weight: 500; }
.fw-normal { font-weight: 400; }

.text-uppercase { text-transform: uppercase; }

/* Form Controls */
.form-control {
    border: 1px solid #b6becb;
    border-radius: 0.25rem;
    padding: 0.5rem 0.75rem;
    color: #060b48;
}

.form-control:focus {
    border-color: #060b48;
    box-shadow: 0 0 0 0.2rem rgba(6, 11, 72, 0.1);
}

.form-label {
    font-weight: 700;
    color: #060b48;
    margin-bottom: 0.5rem;
}

/* Links */
a {
    color: #050d6e;
}

a:hover {
    color: #060b48;
    text-decoration: none;
}
