@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap");

/* Override Default WP Login Styles */
body.login {
  background-color: #0f0e17 !important;
  background-image: radial-gradient(circle at 50% 0%, #2e2136 0%, #0f0e17 70%);
  font-family: "Inter", sans-serif !important;
  color: #fffffe !important;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

#login {
  width: 400px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important; /* Force visible */
  opacity: 1 !important;
  visibility: visible !important;
}

#loginform {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* #login h1 { display: block; } - Restore Logo */

/* Custom Container */
#dgt-login-container {
  background: #1f1f2e; /* Darker, like dashboard card */
  border: 1px solid #333;
  padding: 40px 50px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
  width: 100%;
}

/* Add spacing for shortcode pages - Increased and Enforced */
body:not(.login) #dgt-login-container {
  margin: 60px auto !important;
}

/* --- ACCOUNT V2 STYLES --- */

/* HIDE WORDPRESS DEFAULTS - EXTREME */
#wpadminbar,
#masthead,
#site-header,
.site-header,
.elementor-location-header,
header.elementor-section,
[data-elementor-type="header"],
.header-main,
.navbar,
.elementor-widget-nav-menu,
.ast-main-header-wrap,
header,
footer,
.site-footer,
#colophon,
.ast-footer-copyright,
.elementor-location-footer {
    display: none !important;
}

/* Ensure OUR footer stays visible */
#dgt-custom-footer {
    display: block !important;
}

/* BUT SHOW OUR HEADER */
#dgt-custom-header {
    display: block !important;
}

html { 
    margin-top: 0 !important; 
}
body {
    padding-top: 80px; /* Space for new header */
    background-color: #0f0e17;
    background-image: radial-gradient(circle at 50% 0%, #4c1d95 0%, #1e1b4b 30%, #0f0e17 80%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #fffffe;
}

/* CUSTOM HEADER CONTAINER */
#dgt-custom-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    z-index: 2147483647; /* Max Integer Z-Index */
    box-shadow: 0 4px 40px rgba(0,0,0,0.4);
}

/* INNER MAX-WIDTH CONTAINER */
.dgt-header-inner {
    width: 100%;
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dgt-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dgt-brand .dgt-dot {
  color: #ef4444; /* Web Red */
}
.dgt-brand span {
  color: white; /* DGT Text White */
}

.dgt-logo-font {
  font-family: "Inter", sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: -1px !important;
}

#dgt-header-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}

.dgt-nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}
.dgt-nav-link:hover {
  color: white;
}

.dgt-header-btn {
  background: linear-gradient(135deg, #9146ff 0%, #7c3aed 100%);
  color: white;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.dgt-header-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
  color: white;
}

/* User Profile Mini in Header */
.dgt-header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px 15px 5px 5px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.2s;
}
.dgt-header-user:hover {
  background: rgba(255, 255, 255, 0.1);
}
.dgt-header-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
  color: white;
}
.dgt-header-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
}
/* --- Profile Page Overhaul (GSS Style) --- */
#dgt-profile-card {
  background: transparent; /* Was #1e1b4b */
  border: none;
  box-shadow: none;
  color: white;
  font-family: "Inter", sans-serif;
  max-width: 800px;
  margin: 60px auto; /* Reset margin */
}

.dgt-hero-section {
  background: #1e1b4b; /* Give it the base color back so the gradient sits on something solid if needed, or just opaque base */
  background-image: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.2) 0%,
    rgba(124, 58, 237, 0.1) 100%
  );
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px; /* Standalone rounded corners */
  position: relative;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px; /* Space between header and content cards */
}

.dgt-content {
  padding: 0; /* Remove padding since container is gone */
}

/* Ensure grid items fill width */
.dgt-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dgt-avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}

.dgt-identity {
  flex: 1;
}
.dgt-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.dgt-name {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: white;
}

.dgt-icon-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 4px;
  display: flex;
  transition: color 0.2s;
}
.dgt-icon-btn:hover {
  color: white;
}

.dgt-meta-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.dgt-role-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid;
  display: inline-block;
}
.dgt-email-display {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.dgt-content {
  padding: 0;
}
.dgt-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dgt-settings-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.dgt-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.5);
}

.dgt-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}
.dgt-text-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}
.dgt-text-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dgt-compact-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.dgt-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.dgt-save-btn-small {
  flex: 1;
  padding: 8px;
  background: #6366f1;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}
.dgt-cancel-btn-small {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
}

.dgt-delete-link {
  background: none;
  border: none;
  color: #f87171;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  opacity: 0.8;
}
.dgt-delete-btn-confirm {
  flex: 1;
  padding: 8px;
  background: #ef4444;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Danger Zone */
.dgt-card-danger {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.dgt-card-header-danger {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ef4444;
}

.dgt-warning-text {
  font-size: 0.85rem;
  color: #fca5a5;
  margin-bottom: 10px;
}
.password-criteria-list {
  margin-top: -10px;
  margin-bottom: 20px;
  text-align: left;
}

.criterion {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 2px;
  transition: color 0.3s ease;
}

.criterion.valid {
  color: #4ade80 !important;
  font-weight: 500;
}

#dgt-title-group {
  margin-bottom: 30px;
}

#dgt-login-container h1 {
  display: block !important;
  color: #fffffe;
  font-size: 1.8rem;
  margin: 0 0 10px 0;
  font-weight: 700;
}

#dgt-login-container .subtitle {
  color: #a0a0a0;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
}

label {
  display: block;
  text-align: left;
  color: #a0a0a0;
  font-size: 0.8rem;
  margin-bottom: 5px;
  font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100% !important;
  background: #13131f !important; /* Very dark input bg */
  border: 1px solid #2d2d3f !important;
  color: white !important;
  padding: 12px 15px !important;
  margin-bottom: 20px !important;
  border-radius: 8px !important;
  font-size: 0.95rem !important;
  box-shadow: none !important;
  height: auto !important;
}

input:focus {
  border-color: #8b5cf6 !important; /* Violet/Purple focus */
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2) !important;
}

.dgt-action-btn {
  background: linear-gradient(
    135deg,
    #7c3aed 0%,
    #6d28d9 100%
  ); /* Purple gradient */
  color: white;
  border: none;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dgt-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
  filter: brightness(1.1);
}

.dgt-action-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.dgt-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-size: 0.9rem;
}

.dgt-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.dgt-links a:hover {
  color: #fff;
}

.dgt-divider {
  color: rgba(255, 255, 255, 0.2);
}

.dgt-footer {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  margin-top: 32px;
}

.dgt-error {
  color: #ff4444;
  margin-top: 20px;
  font-size: 14px;
  background: rgba(255, 68, 68, 0.1);
  padding: 10px;
  border-radius: 4px;
  display: none;
}
.dgt-error:not(:empty) {
  display: block;
}

/* Hide standard elements better */
#nav,
#backtoblog,
.language-switcher {
  display: none !important;
}

/* Override Elementor Buttons */
.elementor-button {
    border-radius: 8px !important; /* Less rounded */
    font-family: "Inter", sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease !important;
    color: white !important;
}

.elementor-button:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Custom Footer */
#dgt-custom-footer {
    padding: 60px 20px 40px;
    margin-top: auto; /* Push to bottom */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #0f0e17; /* Solid base */
    position: relative;
    z-index: 10;
}

.dgt-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.dgt-footer-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.dgt-footer-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.dgt-footer-link:hover {
    color: #ef4444; /* Hover Red */
}

.dgt-copyright {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
}

/* Aggressive Transparency Override */
.dgt-transparent-override,
.dgt-transparent-override > .elementor-background-overlay {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
}

.dgt-transparent-override::before,
.dgt-transparent-override::after {
    background: transparent !important;
    display: none !important;
}

/* --- UNIFIED LOGIN PAGE STYLES --- */
.dgt-login-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
    padding: 20px;
    
    /* Full Screen Fixed Overlay to match wp-login.php body */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999; /* On top of everything */
    
    /* Exact Background from body.login */
    background-color: #0f0e17;
    background-image: radial-gradient(circle at 50% 0%, #2e2136 0%, #0f0e17 70%);
    background-repeat: no-repeat;
    background-size: cover;
}

.dgt-login-container {
    width: 100%;
    max-width: 500px; /* Account for 400px content + 100px padding overflow in WP */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; 
}

/* Header Section */
.dgt-login-header {
    text-align: center;
    color: #fff;
    font-family: 'Inter', sans-serif;
    margin-bottom: 10px; /* Reduced to match wp-login 10px gap */
}

.dgt-login-icon {
    font-size: 48px;
    margin-bottom: 10px;
    color: #8b5cf6; /* Light Purple Icon */
}

/* SVG Shield Icon Style if used */
.dgt-login-icon svg {
    width: 60px;
    height: 60px;
    fill: none;
    stroke: #8b5cf6;
    stroke-width: 2;
}

.dgt-login-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.dgt-login-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Card */
.dgt-login-card {
    width: 100%;
    background: #1f1f2e; 
    border: 1px solid #333; 
    border-radius: 20px; 
    padding: 40px 50px; /* Restore Original Large Padding */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); 
    box-sizing: border-box;
}

/* Form Groups */
.dgt-input-group {
    margin-bottom: 20px; /* Revert to match line 496 margin roughly or stick to 20 */
    text-align: left;
    width: 100%;
}

.dgt-input-group label {
    display: block;
    color: #a0a0a0; /* Exact match line 482 */
    font-size: 0.8rem; /* Exact match line 483 */
    font-weight: 600; /* Exact match line 485 */
    margin-bottom: 5px; /* Exact match line 484 */
    font-family: 'Inter', sans-serif;
}

.dgt-input-group input {
    width: 100%;
    background: #13131f; /* Exact match line 492 */
    border: 1px solid #2d2d3f; /* Exact match line 493 */
    border-radius: 8px; /* Exact match line 497 */
    padding: 12px 15px; /* Exact match line 495 */
    color: white; /* Exact match line 494 */
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem; /* Exact match line 498 */
    margin-bottom: 0; 
    box-shadow: none;
    height: auto;
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
    font-weight: 400;
}

.dgt-input-group input:focus {
    border-color: #8b5cf6; /* Exact match line 504 */
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2); /* Exact match line 506 */
}

.dgt-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Button */
.dgt-btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: none;
    border-radius: 8px; /* Match Inputs */
    padding: 14px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
    margin-top: 10px; /* Restored to match wp-login total gap (20px input + 10px button = 30px) */
    
    /* MATCH WP-LOGIN */
    text-transform: uppercase;
    letter-spacing: 1px;
    box-sizing: border-box; /* Ensure padding doesn't increase width beyond container */
}

.dgt-btn-primary:hover {
    opacity: 0.9;
}
.dgt-btn-primary:active {
    transform: scale(0.98);
}
.dgt-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Links Footer */
.dgt-login-links {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

.dgt-login-links a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.dgt-login-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Bottom Footer */
.dgt-login-brand-footer {
    margin-top: 30px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.2);
    font-family: 'Inter', sans-serif;
    text-align: center;
    width: 100%;
    display: block;
}

/* Messages */
.dgt-login-msg {
    display: none;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
}
.dgt-login-msg.error {
    background: rgba(220, 38, 38, 0.1);
    color: #f87171;
    border: 1px solid rgba(220, 38, 38, 0.2);
}
