@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;700&display=swap');

body {
    font-family: 'Ubuntu', sans-serif;
    overflow-x: hidden;
    background: radial-gradient(circle, rgb(240,240,244), rgb(245,245,248));
    
}

:root {
    --primary: #062635;
    --secondary: #3480a3;
    --light: #F7FAFF;
    --dark: #1D1D27;
}

/*
.query-form {
    border: 1px;
    border-style: solid;
    border-color: var(--dark);
    border-radius: 4px;
    width: 250px;
    height: 40px;
    background-color: var(--light);
    padding-left: 5px;

}

.query-button {
    background-color: var(--light);
    border: 1px;
    border-radius: 4px;
    border-color: var(--primary);
    border-style: solid;
    height: 40px;
    margin-left: 2px;
    margin-right: 2px;
    transition: border 1s ease, background-color 0.7s ease, color 0.5s ease;

}*/

.query-button:hover{
    border: 1px solid var(--primary);
    background-color: var(--primary);
    color: var(--light);

}


.queries {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    background-color: var(--light);
    margin: 0px 200px;
    border-radius: 20px;
    border-color: var(--light);
    border-style: solid;
    border: 0px;
    padding-top: 5px;
    padding-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.queries:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.back-and-front-button {
    text-decoration: none;
    background-color: var(--primary);
    color: var(--light); 
    border: 1px;
    border-radius: 5px;
    border-style: solid;
    border-color: var(--primary);
    font-size: 20px;
    padding: 7px 15px;
    display: inline-block;
    transition: background-color 0.5s ease, color 0.5s ease, box-shadow 0.3s ease;
}

.back-and-front-button:hover {
    background-color: var(--light);
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.back-container {
    display: flex;
    align-items: center;
    gap: 10px;
}


.btn-past-queries {
    margin-top: 5px;
    border: 1px;
    border-radius: 5px;
    border-color: var(--primary);
    border-style: solid;
    background-color: var(--light);
    font-size: medium;
    padding: 5px 10px;
    transition: background-color 0.5s ease, color 0.5s ease, box-shadow 0.3s ease;
}

.btn-past-queries:hover {
    background-color: var(--primary);
    color: var(--light);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}


.queries-header {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    padding-left: 25px;
}



.identity-container {
    display: flex;
    flex-direction: column;
    gap: 0px;
    align-items: center;
    background-color: var(--light);
    margin: 0px 200px;
    border-radius: 20px;
    border-color: var(--light);
    border-style: solid;
    border: 0px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.identity-container:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#go-to-identities-btn {
    margin: 7px 0px;


}



.form-container {
    background-color: var(--light);
    margin: 25px;
    border-style: solid;
    border: 0px;
    border-radius: 8px;
    border-color: var(--light);
    height: 295px;
    padding-left: 25px;
    padding-right: 25px;
    position: relative;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.4s ease;
}

.form-container:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}


#btn-other-params {
    padding-left: 10px;
    padding-right: 10px;
    position: absolute;
    bottom: 15px;
    margin: 0px 0px;
    left: 50%;
    transform: translateX(-50%);

}

#btn-phone-number {
    padding-left: 10px;
    padding-right: 10px;
    position: absolute;
    bottom: 15px;
    margin: 0px 0px;
    left: 50%;
    transform: translateX(-50%);

}

#btn-email-identities {
    padding-left: 10px;
    padding-right: 10px;
    position: absolute;
    bottom: 15px;
    margin: 0px 0px;
    left: 50%;
    transform: translateX(-50%);

}


#params-optional {
    margin-bottom: 26px;


}

#mini-form-cont-1{
    height: 160px;
}

#mini-form-cont-2{
    height: 195px;
}


.add-button {
  position: absolute;
  top: 15px;  /* adjust vertical position */
  right: 15px; /* pinned to right edge */

  cursor: pointer;
  line-height: 24px;
  text-align: center;
}


.make-relative {

    position: relative;
}



.popup-form {

  display: flex;
  flex-direction: column;
  justify-content: center;  /* vertical center */
  align-items: center; 


  position: absolute;
  top: 40px;  /* adjust so it appears below the + button */
  right: 0;
  background: white;
  border: 1px solid #ccc;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1000;
  padding-left: 20px;
  padding-right: 20px;
  border-radius: 5px;
}


.btn-remove {
    border: 1px dashed;
    border-radius: 5px;
    border-color: #cf2932;
    background-color: white;
    color:#cf2932;
    transition: color 0.4s ease, background-color 0.3s ease;
    padding: 5px 10px;
    font-size: medium;
    margin-top: 13px;
    margin-left: 3px;

}

.btn-remove:hover{
    background-color: #cf2932;
    color: white;

}

.key-row {
  display: flex;
  gap: 8px;
  align-items: center;
}


.input-key-name{
    margin-right: 10px;
    height: 30px;

}

#popup-create{
    margin-top: 0px;
}


.form-popup{
    margin-block-end: 0em;


}




.query-form {
  padding: 10px;
  font-size: 16px;
  margin: 1px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: var(--light);
  height: 50px;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);


}

.query-form:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}



#query-fill {
    padding: 11.5px;
    

}

.query-button {
  margin:1px;
  padding: 11.5px 20px;
  font-size: 16px;
  background-color: var(--primary);
  border: none;
  color: var(--light);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.4s ease, color 0.2s ease, box-shadow 0.3s ease;;
  height: 50px;
}

.query-button:hover {
  background-color: rgba(6, 38, 53, 0.82);
  color: white;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}


#password-change-container{
    margin-top: 40px;
    height: 300px;
    display: flex;
    
}

#password-change-container-2{
    margin-top: 40px;
    height: 250px;
    width: 400px;
    display: flex;
    
}


.input-password-change{
  padding: 10px;
  font-size: 14px;
  margin: 1px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: var(--light);
  height: 30px;


}

.input-password-change-2{
  padding: 10px;
  font-size: 14px;
  margin: 1px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: var(--light);
  height: 30px;
  margin-top: 40px;
  margin-bottom: 40px;

}


#cp-button{

  display: block;
  margin: 0 auto;
}


#query-type:hover{
    background-color: rgba(247,250,255, 0.52);

}

#query-type{
    cursor: pointer !important;

}



.container-1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  margin:0;
  padding-right: 0px;
  padding-top: 0px;
}

.brand-text {
  margin-right: auto; /* Aligns text to the left */
}

.brand-text h1 {
  font-size: 24px;
  margin: 0; /* Removes default margin */
}

.brand-text .fs-5 {
  font-size: 18px;
}



.db-main-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 50px; /* Space between sections */
}

/* --- Hero Section --- */
.db-hero-section {
    text-align: center;
}

.db-title {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 5px;
}

.db-subtitle {
    color: #666;
    margin-top: 0;
    margin-bottom: 30px;
}

/* --- Professional Unified Search Bar --- */
.db-search-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: stretch;
}

.db-search-group {
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 5px 15px;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.db-search-group:focus-within {
    border-color: var(--secondary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.db-search-icon {
    color: #999;
    margin-right: 10px;
}

.db-search-input {
    border: none;
    outline: none;
    font-size: 16px;
    width: 100%;
    color: var(--dark);
    font-family: 'Ubuntu', sans-serif;
}

.db-select-wrapper {
    border-left: 1px solid #eee;
    padding-left: 10px;
    margin-left: 10px;
}

.db-search-select {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
}

.db-search-btn {
    background-color: var(--primary);
    color: var(--light);
    border: none;
    border-radius: 8px;
    padding: 0 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.db-search-btn:hover {
    background-color: var(--secondary);
}

/* --- Grid Action Cards --- */
.db-grid-actions {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns */
    gap: 20px;
}

@media (max-width: 600px) {
    .db-grid-actions { grid-template-columns: 1fr; } /* Stack on mobile */
    .db-search-form { flex-direction: column; }
    .db-search-btn { padding: 12px; }
}

.db-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--dark);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.db-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.db-card-icon {
    width: 40px;
    height: 40px;
    background-color: var(--light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 18px;
}

.db-card-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.db-card-text span {
    font-size: 13px;
    color: #777;
}

.db-card-arrow {
    margin-left: auto;
    font-weight: bold;
    color: var(--secondary);
}

/* --- History Section --- */
.db-history-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.db-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.db-history-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--primary);
}

.db-link-muted {
    text-decoration: none;
    color: #999;
    font-size: 14px;
    transition: color 0.2s;
}

.db-link-muted:hover {
    color: var(--secondary);
}

.db-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.db-tag-btn {
    background: var(--light);
    border: 1px solid #dae1e7;
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--dark);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.db-tag-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}



/* =========================================
   SOPHISTICATED IDENTITY SEARCH STYLES
   ========================================= */

/* Layout & Typography */
.db-main-container.centered-view {
    max-width: 600px; /* Limits width for a focused look */
    margin: 40px auto;
    padding: 0 20px;
    min-height: 80vh; /* Centers vertically visually */
}

.db-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
}

.db-hero-text {
    text-align: center;
    margin-bottom: 0px;
}

.db-hero-text h2 {
    color: var(--primary);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.db-hero-text p {
    color: #6b7280;
    font-size: 1.1rem;
}

/* --- The Tabbed Card --- */
.db-tab-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
    border: 1px solid #f3f4f6;
    overflow: hidden;
}

/* Tab Header (The Buttons) */
.db-tabs-header {
    display: flex;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.db-tab {
    flex: 1; /* Equal width tabs */
    padding: 20px 15px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 2px solid transparent;
}

.db-tab:hover {
    color: var(--primary);
    background-color: #f3f4f6;
}

.db-tab.active {
    color: var(--primary);
    font-weight: 700;
    background-color: white;
    border-bottom: 2px solid var(--secondary);
}

/* Tab Content Area */
.db-tab-content {
    padding: 30px;
    animation: fadeEffect 0.4s;
}

@keyframes fadeEffect {
    from {opacity: 0; transform: translateY(5px);}
    to {opacity: 1; transform: translateY(0);}
}

/* --- Inputs & Forms --- */
.form-group {
    margin-bottom: 20px;
}

.id-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    margin-top: 15px;
}
.id-label:first-child { margin-top: 0; }

.id-input {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
    color: var(--dark);
}

.id-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(52, 128, 163, 0.1);
}

.id-hint {
    background-color: #eff6ff;
    color: var(--secondary);
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Buttons --- */
/* The main action button */
.db-btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    width: 100%; /* Ensures it fits container */
    margin-top: 10px;
}

.db-btn-primary:hover {
    background-color: var(--secondary);
    transform: translateY(-1px);
}

/* The History Button */
.db-btn-outline {
    text-decoration: none;
    color: var(--primary);
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    background: white;
}

.db-btn-outline:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Utilities */
.id-form-row { display: flex; gap: 15px; }
.id-form-col { flex: 1; }
.mt-20 { margin-top: 20px; }
.error-msg { color: #ef4444; font-size: 0.875rem; margin-top: 10px; text-align: center; }

/* Back Button */
.id-back-btn {
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}
.id-back-btn:hover { color: var(--primary); }




/* =========================================
   ASSET MONITOR PAGE STYLES (FIXED)
   ========================================= */

/* Fix the Clipping Bug */
.overflow-visible {
    overflow: visible !important;
}

/* Positioning Context */
.relative-container {
    position: relative;
}

/* Header inside the Card */
.asset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
    /* Manually round top corners because we removed overflow:hidden */
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.asset-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary);
}

.small-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    margin: 0;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* --- The Asset List --- */
.asset-list-container {
    padding: 0;
}

.asset-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
}

/* Manually round bottom corners of the last item */
.asset-row:last-child {
    border-bottom: none;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.asset-row:hover {
    background-color: #fcfcfc;
}

.asset-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.asset-icon {
    width: 35px;
    height: 35px;
    background-color: #e0f2fe;
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.asset-name {
    font-weight: 500;
    color: var(--dark);
    font-size: 1rem;
}

.btn-icon-delete {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.btn-icon-delete:hover {
    background-color: #fee2e2;
}

/* --- The Popover Form (Fixed Positioning) --- */
.asset-popup {
    position: absolute;
    /* This anchors it to the right side of the Header container */
    top: 60px; 
    right: 10px;
    width: 280px;
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); /* Stronger shadow to pop out */
    border-radius: 12px;
    padding: 20px;
    z-index: 999; /* Ensure it is on top of everything */
    animation: popIn 0.2s ease-out;
}

/* Optional: Add a little triangle pointing up to the button */
.asset-popup::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
}

@keyframes popIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.popup-title {
    margin: 0 0 15px 0;
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
}

.popup-input-group {
    margin-bottom: 12px;
}

/* Empty State */
.empty-state-box {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.empty-state-box i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
    opacity: 0.5;
}

.footer-note {
    text-align: center;
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 20px;
}




/* =========================================
   HISTORY PAGE STYLES
   ========================================= */

/* Make the row look clickable */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.clickable-row:active {
    background-color: #f0f2f5;
    transform: scale(0.99);
}

/* History Icon specific color (Purple/Grey instead of Blue) */
.history-icon {
    background-color: #d4e9fc; /* Light purple background */
    color: var(--primary); 
}

/* The chevron arrow on the right */
.row-arrow {
    color: #d1d5db;
    font-size: 0.9rem;
}

/* Hover effect for the arrow */
.clickable-row:hover .row-arrow {
    color: var(--secondary);
}

.history-details {
    display: flex;
    flex-direction: column;
}

/* =========================================
   API MANAGEMENT STYLES
   ========================================= */

/* The Key Icon Background (Gold/Orange for "Keys") */
.key-icon-bg {
    background-color: #fff7ed; /* Light Orange/Gold */
    color: #ea580c; /* Darker Orange */
}

/* Container for Name + Code */
.api-key-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* The visual style for the API Key string */
.code-snippet {
    font-family: 'Roboto Mono', monospace; /* Monospace font */
    font-size: 0.85rem;
    background-color: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    display: inline-block;
    max-width: 300px; /* Prevents super long keys from breaking layout on small screens */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 500px) {
    .code-snippet {
        max-width: 180px; /* Smaller width for mobile */
    }
}



/* =========================================
   PASSWORD CHANGE
   ========================================= */

/* Remove bullet points from Django error lists */
.field-errors ul {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.field-errors li {
    color: #ef4444; /* Red color matching other errors */
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Optional: Add a small warning icon before the error text */
.field-errors li::before {
    content: "\f071"; /* FontAwesome warning icon code */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}